How to Migrate WordPress the Right Way: A Comprehensive Guide

How to Migrate WordPress the Right Way: A Comprehensive Guide

Planning to switch hosting providers? Then you need to know how to migrate your WordPress site.  If you’re not sure how don’t worry.  This article will explain the two different methods on how to do just that. Furthermore, there’s also a tutorial for those who want to migrate from to

Let’s get started!

Limited time offer. Migrate WordPress site to Hostinger and get up to 82% OFF for WordPress hosting packages.

Get Your 82% OFF Discount

Why Migrate Your WordPress Website?

For some website owners, migrating a WordPress site is a bothersome experience as there are many details to pay attention to during the transfer process. Others think it’s too risky and may damage the whole website. However, even if there are some risks involved, website migration can be a seamless process and will bring several benefits if done correctly:

  • Affordable plan — the price of a hosting service has dropped significantly due to the number of competitors. Hostinger’s shared plan, for example, starts from as low as $0.99/month.
  • Better customer support — a reliable team that you can count on to solve any issues.
  • Increase site performance — you’ll get better hardware, load time, and uptime.
  • More features —  if you’re moving your site from to, you’ll get the freedom to build your own theme, monetize your websites, and install any plugin.

How to Migrate WordPress Website the Right Way?

Let’s dig into the two methods to migrate your WordPress site: the manual way and with the help of a plugin.

Method 1: Migrating WordPress Site Manually

Manual migration requires you to transfer files and databases, and then edit the wp-config.php file. You can do it all via the file manager on your hosting control panel or use an FTP client like FileZilla.

Step 1. Back up Your WordPress Files and MySQL Database

First thing first, you need to download all WordPress files to your computer. These files will be uploaded to your new hosting account later on.

  1. Connect FileZilla to your old site server.
  2. Open the public_html folder and select all the files inside it.
  3. Right-click and select Download.
    Downloading WordPress files using FileZilla

After the download is finished, it’s time to create a backup of your MySQL database:

  1. Access the phpMyAdmin page from your control panel.
  2. Select the database where you store your WordPress files and press the Export button.Export the Database using phpMyAdmin Page
  3. Pick the Quick method to export your entire database, and then choose SQL as the format.
    Choosing the method and the format when exporting MySQL database
  4. Hit Go. Your database file will be saved automatically to your desktop directory.

Step 2.  Upload WordPress Files and MySQL Database to Your New Host

The next step of migrating your WordPress site is to upload the files you’ve downloaded to your new host.

  1. Decompress your WordPress backup file.
  2. Connect FileZilla to your new hosting account and navigate to the public_html folder in the Remote Site column.
  3. Locate the files you want to upload from the Local Site column, right-click on the files, and select Upload.
    Upload WordPress Files Using FileZilla

After that step is done, now we need to upload the MySQL database:

  1. Open the control panel of your new hosting account and head over to MySQL Databases.
  2. Create a new database and take note of the database name, username, and password.
  3. Head back to Databases -> phpMyAdmin and select your new database.
  4. Click the Import tab at the top of the page.
  5. Select the Choose File button and upload the MySQL backup file you’ve downloaded.Uploading the backup of MySQL database through phpMyAdmin
  6. Leave all settings as they are and hit Go.

Step 3.  Update wp-config.php with Your New Database Details

Next, specify the credentials of your new MySQL database by editing the wp-config.php file in your new hosting account.

  1. Reaccess the public_html folder from FileZilla and locate the wp-config.php file.
  2. Right-click and select View/Edit.
  3. Change these values with your new database details:
    • DB_NAME – database name.
    • DB_USER – database username.
    • DB_PASSWORD – user password.
    • DB_HOST – database hostname (this value is usually localhost, but it may vary depending on your hosting platform).Editing the wp-config.php file
  4. Select Save, then a popup window will appear. Click Yes.

Step 4.  Update WordPress URLs (Optional)

You should follow this step only if you plan to use a different domain name when migrating your WordPress site. Before proceeding, make sure that the new domain is functional and correctly pointed to your new hosting platform.

  1. Head to the phpMyAdmin page and select the wp_options table.
  2. Locate site url and home under the option_name column.
  3. Double click the field under option_value and replace the old domain with the new one.
    Replacing Old Domain by using phpMyAdmin
  4. Access your WordPress Dashboard, then install and activate the Velvet Blues Update URLs plugin.
  5. Navigate to Tools -> Update URLs. Fill out the fields with your old and new domain, and check all the boxes.Update WordPress URLs Using the Velvet Blues Update URLs plugin
  6. Press Update URLs NOW.

Alternatively, you can also update all WordPress URLs by running a query via phpMyadmin.

Method 2: Utilizing a Cloning Plugin

Another method to migrate a WordPress site is by using a cloning plugin. Although there are hundreds of PHP cloning scripts, we recommend using All-in-One WP Migration as it is straightforward and provide all the necessary tools to migrate your site.

Before we continue, make sure you have WordPress installed on your new hosting account, and the plugin activated on both the old and new accounts. Once you’re done, follow the steps below:

  1. Open the admin dashboard of the site you’re transferring and head over to All-in-One WP Migration -> Export.
  2. Click Export to and choose File option from the drop-down menu.Export WordPress Using All in One WP Migration
  3. Wait for the plugin to finish retrieving your site files. After that, download your site files from the popup window.
  4. Open the dashboard of your new site and select Import under the All-in-One WP Migration menu.
  5. Click Import from and pick File. Then, locate the files you’ve exported.Import WordPress Using All in One WP Migration
  6. Once the process is completed, click Finish.

The final step of using the plugin is to re-save your permalink structure. You need to change the structure twice as it will regenerate your .htaccess file:

  1. From the sidebar menu, select Settings -> Permalinks.
  2. Choose a new structure and press Save Changes. If you’re using a Custom Structure, make sure to copy it first.
  3. Reload to the Permalinks settings page and select your original structure. Hit Save Changes once you’re done.

Method 3: Using Automatic Migration Tool

Hostinger’s automatic migration tool is the fastest and easiest way to transfer your WordPress website. This feature will take care of the entire migration process for you.

This tool requires your WordPress site’s login details, such as the username, password, and link you use when logging in to your WordPress admin panel (

Besides that, you will need the link to your previous hosting provider’s login page and the username and password to access your old hosting account.

To use Hostinger’s migration tool, you can follow these simple steps:

  1. Log in to your hPanel and navigate to the Migrations Requests under the Hosting section.
  2. Click on the Request Hosting Migration button and choose WordPress Migration. Hostingers manage migrations request page
  3. Fill in the required fields, select your hosting account, then click Submit.enter in your migration hosting information

Migrating from

The tutorials above are perfect for those who have their websites hosted on a hosting service. But what about those who just signed up for a hosting account and want to migrate their sites to Don’t worry. Sit tight and let’s go over the details on how to do that:

  1. On your admin panel, and go to Tools -> Export.
  2. Press the Export All button and click Download.Exporting content
  3. Locate the .zip file you’ve downloaded, then extract it.
  4. Now, access your dashboard and select Tools -> Import.
  5. Scroll down and find the option for WordPress. Click Install Now, wait for the installation to finish, and select Run Importer.Importing files to
  6. On the Import WordPress page, upload your file, and hit Upload File and Import.
  7. Next, fill out the user information on the Assign Authors page and click Submit.Assign Authors Page

Keep in mind that this method will only transfer your posts, pages, and media files. Other site data like themes and plugins need to be installed manually.


All in all, migrating your WordPress site is a straightforward process and can be done quickly. So if you think you need to migrate to a new host or switch to self-hosted WordPress, don’t be afraid to do so!

Here’s a quick recap on the explained methods:

  • Manual Transfer — use an FTP client or the file manager in your control panel to transfer files and databases.
  • Utilizing a Cloning Plugin — export and import your WordPress files with just a few clicks.
  • Using automatic migration tool – easily and quickly migrate to Hostinger with its Migration Request.
  • Switching from — effortless migration by using WordPress’ built-in features.

We hope that this tutorial can help you migrate your WordPress site. Hit the comment section below if you have any questions and suggestions.

The Author


Domantas G. / @domantas

Domantas leads the content and SEO teams forward with fresh ideas and out of the box approaches. Armed with extensive SEO and marketing knowledge, he aims to spread the word of Hostinger to every corner of the world. During his free time, Domantas likes to hone his web development skills and travel to exotic places.

Related tutorials


Juanma Reply

November 06 2017

ok, I can access to the Hostinger cPanel, but not to the Wordpress admin page


Daniele Folatelli Reply

September 22 2020

Great step by step guide. One question. I plan to use the same domain name on Hostinger as I have on my old site. Can I do this with all the options you listed? Do I first migrate my wordpress site and then work on the DNS information on the Hostinger site to point to my domain?


    Tomislav T.

    Replied on November 18 2020

    Hey Daniele. Yes you can do that with all options listed, and you should first migrate, then point the DNS.

Leave a reply




This site uses Akismet to reduce spam. Learn how your comment data is processed.

Become a part of Hostinger now!

More in WordPress
How to Find Your WordPress Database Name