The most satisfying advantage of having WordPress installed locally on your computer is that it lets you play with the site bringing any modification without breaking the live site. Most of the developers prefer working on localhost and develop their sites with all essential functionalities. Once you are done with developing your site locally, you need to move it to your live server. Yes, this is where we are taking you. In this article, we will talk about how you can migrate a WordPress site from localhost to a live server.
If you are a beginner and don’t know much about installing WordPress on your localhost, read our blog post on how to install WordPress on localhost and develop your site then follow this tutorial to migrate WordPress site to a live server.
Migrating WordPress sites to live servers can be very challenging as there are different ways to go through. But, with this tutorial in hand, you will find it a lot simpler.
How to migrate WordPress site from localhost to web server
As mentioned earlier, there are many ways to migrate the WordPress site from localhost to the live server. We will show you the easiest way that works for almost everyone without leaving a single error. Here, we are going through the whole process with a WordPress plugin. Duplicator is that particular WordPress migration plugin that we are going to use today.
Duplicator has both free and premium versions. In our case, the free one will be enough to complete the entire process of migration successfully. So, no worries.
Here is the quick checklist of the steps we are going through.
- Install Duplicator plugin
- Create migration package (installer.php and archive)
- Take installer.php and archive files to live server
- Run installer.php
- Complete the migration through few simple steps
Go to your local WordPress site’s dashboard and install the Duplicator plugin there. You can download the plugin from the WordPress Plugin Directory and install it manually or you can go to Dashboard > Plugins > Add New, then search “Duplicator”, click “Install Now” and “Activate” subsequently.
Once you have activated the Duplicator plugin, you are ready to go. Your Dashboard has a Duplicator option at the bottom. Go to Duplicator. Create a new package by clicking on “Create New” on your right.
After creating the package click “Next” to proceed on.
When you click “Next” button, the system scans all files and the setup to check whether it is ready to go. You will see each one’s status once scanning is complete. Click on “Build” at the bottom.
After a while the system gives you two files (installer.php and whole WordPress files as an archive in an auto generated name) Click on “Installer” and “Archive” to download these two files.
Once downloaded, you have to go through the following steps on the server.
Now you need to take those two files to the web root/www/public_html directory of your server. To do this you need your server’s FTP/SSH credentials (e.g. username, password, server IP). You can use FileZilla to access your server’s root/www/public_html directory from your computer.
After connecting to your server via FileZilla, go to your website’s home directory (web root/www/public_html) and upload the archive and installer.php files from your computer to the live server. The process may take some time depending on your archive file size.
Below is the sample image of how FileZilla looks on Mac.
When you have transferred the files to the live server, you need to access the installer.php file. Go to yoursite.com/installer.php. Select the checkbox and click “Next”. Just like the screen below.
To proceed to the next step you require your server’s MySQL username and password. You can get this info from your hosting company’s support. Or if you have setup your own server (e. g. VPS), you should already know your MySQL credentials.
At this stage, you can either create a new database or connect with an existing one. Select the one you want to go with.
Write your database name, database user name and password then test the database by clicking on the button at the bottom. Test result is shown right below. Now click “Next”.
After clicking on “Next” button there will be a pop up asking you to run installer with this settings. Click “Yes” to go ahead.
The progress will be shown on screen just like the image below
When the process completes, the system will take you to the subsequent stage. Check the URL, path and site name. Click on “Next”.
Log in to your site by clicking the “Site Login” button.
Once you are logged in, you can see the migration success notification on your Dashboard. Remove installation files from the number 2 link below the success notification message.
With the removal of the installer files, you are completely done with your migration process. You can see Duplicator documentation to know more about how it works.
There are more plugins in the WordPress directory that you can use to migrate your WordPress site . If you want to try any other plugin except Duplicator, you can go through our 5 best WordPress migration plugins round up to know which one will serve your purpose the most.
So, this is how you can migrate the WordPress site to your live server. Now you can do whatever you want with your site live on your web server. Taking regular backups is also crucial. In case your site is hacked or disturbed by any unwanted modification, you can easily get your site back if you take the necessary measures to back up your site. Thanks for being with me!
Contact me if you want to migrate your site?
First published on Themeum