After you are done developing your blog locally, it is time to migrate WordPress from localhost to your hosting provider server and make the website visible to the users of the Internet. This tutorial will cover the easiest way on how to achieve this by using one of the most popular WordPress plugins – Duplicator.
What you’ll need
Before you begin this guide you’ll need the following:
- Fully developed WordPress website on your local server.
- Installed and activated Duplicator plugin on your local server. Check out this tutorial if you need help installing plugins.
- Login details to your hosting server’s control panel, or FTP login details.
Step 1 — Creating your Duplicator package
Login to your local WordPress administration area and navigate to Duplicator section. Select Create New on the top right side of the Duplicator plugin’s user interface.
On the next screen, you do not need to change any settings, simply click Next. Duplicator will then perform technical tests and give you the results. Click Build to commence the creation of your Duplicator package.
The end result – two files, a compressed archive, and an
installer.php file. Download both of these files by clicking on their respective buttons:
Step 2 — Uploading the Duplicator package to your hosting server
The two files that you downloaded will now have to be uploaded to your hosting server. You can do this via an FTP client, or a file manager inside your hosting server’s control panel. Check out this tutorial for instructions on how to upload files via File Manager.
In our example, we want to deploy our WordPress website to http://www.domainname.com/wordpress/ , so we will upload our Duplicator package to the /public_html/wordpress/ directory on our hosting server. Both the archive and the
installer.php file must be uploaded to the same directory.
Step 3 — Restoring the Duplicator package
IMPORTANT! Before we proceed, you need to create a new MySQL database and user on your hosting server which will be used by WordPress. Check out this tutorial for a step-by-step guide on how to do this.
Once you have created a database and uploaded both Duplicator files, initiate the Duplicator installer by opening in your browser
installer.php. In our example, we do this by navigating to http://www.domainname.com/wordpress/installer.php. You will be asked to input some database information:
- Since most hosting providers do not allow you to create databases via scripts, make sure to select Connect and Remove All Data.
- Host: Usually it is localhost (however, if you are not sure, contact your hosting provider).
- Name: Set this to the MySQL database name that you created.
- User: Set this to the MySQL username that you created.
- Password: Set this to the MySQL user’s password that you created.
The database will be completely erased, so double-check and make sure you have created an empty database for this migration. Check the I have read all warnings & notices checkbox and click Run Deployment to continue deploying your WordPress website.
In the next screen, you will be asked to specify some details about your WordPress site:
- URL: The address of your website. If you want to deploy to another folder, now is the time to change your URL. If you uploaded the Duplicator files to your desired folder already, no change is needed.
- Path: The path to your WordPress website on your hosting server. If you uploaded the Duplicator files to your desired folder already, no change is needed.
- Title: You can change your WordPress website’s title right now if you wish to do so.
Once you are satisfied, confirm and your website will finally be deployed. After this, your website is already accessible, however, some additional, final steps can be done. Some of them will require that you login to your WordPress administration panel to perform them:
Your WordPress website has now been deployed and is accessible to the Internet at the address that you specified.
You learned how to quickly migrate a WordPress website from localhost to live server. For more WordPress migration steps and specifics which may be needed with more complex websites, check out the WordPress codex.