Easiest Way to Move a WordPress Site from Localhost to Server [Step by Step]

move your WordPress site from localhost to server

If you have installed WordPress on your localhost using WAMP or XAMP, then you might be wanting to move your WordPress site from localhost to server. It is natural that you want to showcase your site to the world.

There are many ways to move a WordPress site from localhost to server. This tutorial will explore the easiest way to move WordPress site from localhost to server step by step.

New users find the manual process complicated. Moving a WordPress site from localhost to server using the manual process requires certain level of expertise, so we will be using a plugin to accomplish the task. The best free plugin to perform this task is Duplicator. Duplicator is completely free and used by more than 1 million people.

The plugin currently has more than 1900+ reviews and more than 1 million active installations. Users can’t go wrong if a plugin has this much usage!

Why Not Manually Move a WordPress Site from Localhost to Server?

You can always use the manual method if you want to take the matter into your own hands. However, we will be using the plugin as we consider this is the easiest way for a new user.

You may have already set up your website on localhost using XAMPP or WAMP. Migrating your site doesn’t have to be complicated. The Duplicator plugin for WordPress takes care of the whole process and makes the experience significantly better.

Part 1: Move a WordPress Site from Localhost to Server (Localhost End)

All you have to do is to install the plugin at your local WordPress installation. If you do not know how to install a plugin, follow our plugin installation tutorial.

  • Search for Duplicator in the WordPress plugin repository.
  • Click Install. Then click again to Activate
  • After activating the Duplicator plugin,  go to your WordPress Dashboard and navigate to the Duplicator settings, available at the bottom left of your Dashboard.  When navigating to the Duplicator settings, you will find there is a section named “Packages.” Click on Packages.
    Move a WordPress Site from Localhost to Server
  • As you have just installed Duplicator for the first time, you will not have any existing backup packages at that point. If you want to create a new package, click the Create New tab.

You will see a few more options like Requirements. It will let you know that if your server supports Duplicator or not.  You should remember that Duplicator only supports websites that are under 2 GB.

2GB is sufficient for most WordPress blogs. But you have if you have a WordPress blog that has more than 2GB of file storage, then you cannot use Duplicator to move your WordPress site from localhost to server. You will have to use a paid plugin like Backup Buddy or will have to transfer the whole website manually.

Creating Backup with Duplicator

So let’s start by creating the first backup. You usually do not need to change anything in the installer options. Given that, you pass all tests; you can proceed to create the site package.

  1. Click next, and Duplicator will begin scan the website to make a full archive and will show a screen like the following.
    Move a WordPress Site from Localhost to Server
  2. If the scan finishes successfully, you will be able to build the package. Click Build to start building.
  3. The plugin will go ahead and backup your whole website including all the plugins themes, posts, pages, and media to a single compressed file.
  4. Once the backing up process is complete, you will be given the option to download two files β€” the archive file in zip format which has all of your contents, database, and media and the installer.php file.
  5. Download both files and store in a safe location. These two files will be used to restore your whole website to a new server.
Move a WordPress Site from Localhost to Server

Part 2: Move a WordPress Site from Localhost to Server (Server End)

We have completed the first part, which is creating the whole backup of your localhost website.

One thing the plugin does not take care is creating a database automatically at your live server. So you have to create a new database on your new server manually. It is pretty easy and only requires a few clicks.

  1. First login to your cPanel
  2. Go to MySQL DatabasesEasiest Way to Move a WordPress Site from Localhost to Server [Step by Step] 1
  3. Give a database name and note the down the full database name with the prefix. in this case, the whole database name is bdjobcareer73_demo
    Easiest Way to Move a WordPress Site from Localhost to Server [Step by Step] 2
  4. You will get a success message after creating the database. The next task is to create a database user. Scroll down, and you will find a database user section. From here, choose a username. In this case, we are creating a database user bdjobcareer73_demo. It is important to note down both the database username and password. We will need this.
    Easiest Way to Move a WordPress Site from Localhost to Server [Step by Step] 3
  5. After clicking Create User, the following window will appear. You can select ALL PRIVILEGES, or you could choose everything except DROP as described in our WordPress Security Guide.
    Easiest Way to Move a WordPress Site from Localhost to Server [Step by Step] 4
  6. Now all you have to is adding the database user to the previously created database. Click Add to add the user to your database.Easiest Way to Move a WordPress Site from Localhost to Server [Step by Step] 5

See the following video to know how to create a database in MySQL easily.

Part 3: Restoring Backup to Live Server

  • First, you have to log in your cPanel and using the credentials hosting company gave you.
  • Navigate to your cPanel File Manager and navigate to public_html.
  • Moving Localhost to Live Server-6

Now you have to upload the two files you had downloaded before.

  • The archive file
  • The installer.php file

After uploading the two files to your document root

  1. Upload both of the files to your document root. In most of the hosting, the document root folder is known as public_html. Upload both the files.
  2. Open a web browser and type your domain name and append installer.php the end of it. For example,
    https://your-domain/installer.php or http(s)://your-domain/your-wp-directory/installer.php.

You will see this screen. Here, you have to fill up the database info that you saved earlier while creating the database.

Migrate Using Duplicator-plugin

3. Enter database setup info ❯ test connection ❯ click Next

The test connection button will verify your connection with the database. If you see an error here, then you do not have a successful connection with your database. If you see a Success message like the image above, then it is all ok to run the deployment.

4. If you click next, you will be provided with the following screen.WordPress duplicator final URL

In the New Settings page, mention your domain name. For example, if you want to move your WordPress website to “abcd.com” then change the URL to “abcd.com” under New Settings.

Giving a new URL in New Settings will replace all localhost links of your database with the new website URL you are providing.

So when you are ready, click Next. The deployment will start. You will get a warning that says “Any existing data in the database will be overwritten”. Ignore the warning and click OK to go ahead with the installation process.


That’s it! You have been successful to move your WordPress site from localhost to server.

You should be able to login to your web server by clicking your WordPress Dashboard. Usually, https://domain.com/wp-admin

The Final Part

The first thing you have to do after restoring from Duplicator is to go to the Permalink section of your WordPress Dashboard.

WordPress Permalink

You have to save the permalink settings twice. This will solve all the link related problems you might have.

That’s it you have finally moved your local server to a live server using an easy way like duplicator. Other plugins which can achieve that like Backup Buddy or Udraft Plus, but they are paid. This is the only free plugin that does it for free.

It is critical that you take care of your WordPress security after installing your WordPress Security Guide and tips to secure your website.

It is also essential to make sure that your site is perfectly optimized for search engines. Follow our Search Engine Optimization Guide for an in-depth tutorial.

Wordpress Icon

Disclosure: WP Hive earns a commission when you buy through partner links. It does not influence the unbiased opinions of our writers. Learn more β†’


https://wphive.com/tutorials/easiest-way-move-a-wordpress-site-from-localhost-to-server-step-by-step/Copy icon

Saif Hassan

Product Manager by passion & profession. Lead Product Manager at weDevs, former PM @ Poptin. Passionate about writing & tech. He's an advocate of Human-Centered Design and believes that websites and the tools used to build them should be well crafted, intuitive, and accessible. Cyclist. Reader. A WordPress ninja πŸ₯·, HCI expert & a design thinker πŸ’‘

Subscribe To Our Newsletter

Newsletter Subscription Form

Leave a Reply

Your email address will not be published. Required fields are marked *