How to Migrate Your WordPress Site from Local to Remote Server

Working on a local server is the best practice for building your WordPress website securely. Once you’re done with the development, the next move is to transfer your site to a live server so it’s available on the internet.

In this guide, we’ll cover two methods to achieve this. First, we’ll walk you through the manual steps for migration. Next, we’ll introduce you to helpful plugins that can simplify the process of moving a WordPress site.

How to Install WordPress Locally With Vagrant

How to Install WordPress Locally With Vagrant

Developing locally is one of the best things that can happen to you. Not only does it let... Read more

How to Manually Move Your WordPress Site

This guide will walk you through the steps to manually transfer your WordPress files and database from your local computer to a live server.

Note: For this tutorial, we’re using MAMP on the local computer and Hostgator with cPanel for the live server.

Step 1: Download Your Local Database

First, let’s make a copy of your existing WordPress database. Follow these steps:

  1. Open your web browser and navigate to http://localhost/phpmyadmin/.
  2. Accessing phpMyAdmin on localhost
  3. In the left sidebar, click on your WordPress database name.
  4. Selecting WordPress database
  5. Click on ‘Export’, choose ‘Gzip’ under Format, and then click ‘Go’.
  6. Exporting WordPress database
Step 2: Create a New Database on the Live Server

Before uploading the local database to the live server, you’ll need to create a new database in your hosting account.

  1. Log in to your hosting account. In the cPanel or admin page, find and click on something like “MySQL”, “MySQL Database”, or “Database”. Then click on “Create New Database”.
  2. Creating new MySQL database
  3. Name your database and click “Create Database”.
  4. Naming the new database
  5. Next, create a user for this database. Enter a username and password, then click “Create User”.
  6. Creating database user
  7. Link the new user to the database. Select both the User and Database names, then click “Add”.
  8. Linking user to database
  9. If prompted, ensure all privilege boxes are checked and click “Make Changes” or “Done”.
  10. Setting user privileges

Note: Make sure to save the username and password – you’ll need them later.

How to Upload Your Database to a Live Server

Now that you’ve exported your local database and created a new one on the live server, it’s time to import the database there.

  1. Go to the admin area of your web hosting account, find the Database section, and click on “PhpMyAdmin”.
  2. Accessing PhpMyAdmin in web hosting account
  3. In the left sidebar, click the name of the database you created earlier. Then, click “Import” in the top menu.
  4. Importing database in PhpMyAdmin
  5. Click “Browse,” select your local database file (in .gzip format), and click “Go.”
  6. Selecting local database file
Update Settings in Your Live Server Database

Once the database is uploaded, you’ll need to update the site URL. Navigate to the wp_options table in the database and locate the siteurl and home entries.

Editing site URL in database

Change the siteurl and home entries from http://localhost to your domain, for example,

Transfer Files to the Live Server

You’ve successfully migrated the database. Now it’s time to upload your WordPress files to your web hosting account. We recommend using an FTP client for this.

If you don’t have an FTP client, you can download FileZilla, or check out our list of free FTP clients. Connect to your web hosting account and start transferring your WordPress files.

Using FileZilla for file transfer

Note: Ensure you’re transferring files to the correct directory, usually public_html/.

Edit the WordPress Configuration File

Finally, you’ll need to edit the wp-config.php file on the live server to connect it to the database.

Open wp-config.php in a text editor and find the following section:

define('DB_NAME', 'your_database_name');
define('DB_USER', 'your_database_user');
define('DB_PASSWORD', 'your_database_password');
define('DB_HOST', 'localhost');

Replace the placeholders with the actual database information you set up earlier.

Verify Settings and Test Your Site

If everything is set up correctly, your site should now be live. Go to the WordPress Dashboard, navigate to Settings > General, and confirm that the URLs are correct. Then, save your changes.

Verifying WordPress settings

Open a new browser tab, enter your site’s URL, and your WordPress site should appear just like it did on your local machine.

Easy Ways to Move Your WordPress Site With Plugins

If you’d rather avoid the hassle of manually transferring files and databases, you can use WordPress plugins to make the migration process easier.

Here are some plugins I highly recommend:


UpdraftPlus is a comprehensive backup plugin for WordPress. It allows you to automatically back up your site and store it on various remote servers like Google Drive, FTP, Dropbox, and more. The plugin offers incremental backups and the option to restore your site directly from the admin panel. The premium version even includes a migration tool for easy site transfers.

UpdraftPlus Plugin Interface

DesktopServer is a desktop app available for macOS and Windows that lets you run WordPress locally on your computer. It simplifies the process of setting up virtual hosts, cloning test sites, creating local multisite networks, archiving sites, and migrating your site.

The application’s Wizard GUI makes the migration process as simple as a few clicks.

DesktopServer Application Interface
All-in-One WP Migration

All-in-One WP Migration is a user-friendly plugin that simplifies the process of transferring your WordPress website. It takes care of complicated steps like moving the database, files, and updating web addresses.

You have the option to leave out specific folders from the transfer, such as spam comments, media files, and blog posts.

Related: Learn how to use the All-in-One WP Migration plugin.

All-in-One WP Migration Plugin Interface
Duplicator Pro

Duplicator Pro is another user-friendly WordPress migration plugin. It’s designed to be easy to use, regardless of your technical expertise. The plugin allows you to move your WordPress site from a local environment to a live server, or between different servers.

Duplicator Pro Plugin Interface

Extra Tip: How to Migrate Using the All-in-One WP Migration Plugin

This guide will show you how to use the All-in-One WP Migration plugin to move your WordPress site.

  1. First, go to your local WordPress site and install the All-in-One WP Migration plugin. Activate it.
  2. Installing All-in-One WP Migration plugin
  3. Next, look for the “All-in-One WP Migration” link on the left sidebar of your WordPress dashboard. Hover over it and click on “Export.”
  4. Navigating to Export option
  5. Choose “Export to,” and then select “File” to download a backup of your database.
  6. Selecting File for database backup
  7. Now, install a fresh WordPress on your live server. Don’t forget to install and activate the All-in-One WP Migration plugin there as well.
  8. Installing WordPress on live server
  9. Go back to the left sidebar and under “All-in-One WP Migration,” click on “Import.”
  10. Navigating to Import option
  11. Select “File,” then browse your computer to find the database backup you downloaded earlier.
  12. Importing database backup
  13. Finally, click “Proceed” to replace the existing database with the one from your local setup.
  14. Confirming database replacement