Moving a local WordPress site to a live server can be complicated, but with the Duplicator plugin, it is actually very easy to do. In this tutorial I will show you all the steps that are required to move a local WordPress site to a live server.
You could have to deal with moving a local WordPress site after you have developed a new WordPress site locally, or after you have revamped a current website that you are hosting. In this tutorial I make use of the Duplicator plugin (from LifeInTheGrid), this plugin is free of charge and I will exactly how to use it.
You can refer to the video below or you could follow the written steps below the video. Good luck and let me know if you run into any problems.
#1 Create a new package with the Duplicator plugin
If you have not yet installed the Duplicator plugin, find it in the WordPress repository and install and activate it first. You won’t be able to run this tutorial without the plugin.
Select the Duplicator plugin from the side menu and create a new package.
Use all the default settings and click next. Now the plugin will scan your site for potential problems. Follow up on potential warnings. If you are getting the large file warning then don’t worry, this does not cause any problems in most cases.
If you received warnings and you have followed up on them, tick the box to continue. Now choose build.
It can take a few minutes depending on how large your site is for the package to finish. Once the package is finished you will be given an option to download an installer file and the archive package. Download both of them.
#2 Upload the Package files to your hosting account
Navigate to the cPanel or equivalent of your hosting account and go to the file manager. Now either two things could apply to your situation: 1) You are uploading a new website or, 2) you are updating a current website.
Uploading a new website
Go to the web root (public_html/www) of your hosting account. Now create a new folder that exactly matches your domain name, it is pivotal that the names exactly match.
domain: www.your-name.com folder: your-name.com
domain: www.thisisyourwebsite.co.uk folder: thisisyourwebsite.co.uk
You don’t need to include the www part of your domain name, but ensure the domain extension and name itself match.
Also make sure that your domain name already points to your hosting account or otherwise you won’t be able to access it.
Updating a current website
Locate the root folder of your website, very important make sure that you are in the right folder!
Delete the contents of this folder, so that the folder is empty.
For example, the root folder of this website on my hosting account is: tropicalup.com
Upload the installer and archive package
After you have a clean folder that matches your domain you can use the file manager to upload the installer and archive file to your hosting account.
Depending on your internet speed, the size of the files, and the speed of your hosting account, this might take some time. Don’t close your browser tab until the upload has completed.
#3 Identify or create mySQL database
We are almost ready to run the installer to deploy your website, but first we need to ensure our mySQL database before we can continue.
Go to your cPanel or similar service and locate the mySQL databases. Create a new database and username here and remember these values so that you can later fill them out in the installer.
Access the mySQL database manager in your cPanel to determine the name of your database and user account information. If you have used default settings before it could be very difficult to determine the appropriate database.
Go to Softaculous in your cPanel, select all installations and select edit to find the details of the appropriate WordPress installation in question.
#4 Run the Installer
Now go the domain address of your website and add; /installer.php to the address, (example: www.yourdomain.com/installer.php).
Follow the steps of the installer. Now you need to select either of the two options.
New website, choose –> Create a new database
Updated website, choose –> Connect and remove all data
database name: the database you identified or created during step 3.
user: identified during step 3
password: identified during step 3
Now test the connection to ensure that the installer is able to connect to the database.
Once you get a pass on the database connection, tick the box that you accept all the warning and proceed with the installation.
Check to be sure that the installation is in the root folder, (e.g. tropicalup, opposed to tropicalup/WordPress or something like that).
Now click Run Update.
Wait for the Installer to finish.
#5 Save the permalinks and check your site
After the installer is finished, ensure that you have not received any errors. When this is the case we will update the permalinks.
Click ‘Save Permalinks’ and log in on your WordPress site on your localhost with your login credentials.
Now under the page click ‘Save Changes’.
Now click ‘Take me to the cleanup page!’. Click ‘Delete reserved files’.
Check if you site functions properly.
Important: If you have a caching plugin installed on your WordPress you might receive an internal server error 500 when you are trying to make changes to pages or posts. This is usually in a PHP file that returns an error. If this happens deactivate your cache plugin and your site will function normally.
Congratulations you have successfully moved your local hosted WordPress site to a live server. If you have any questions or run into any problems let me know in the comments below!