Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
WordPress Plugins
View all Guides

How to Move WordPress to a New Host or Server With No Downtime

Last updated on by
Special WordPress Hosting offer for WPBeginner Readers
How to Move WordPress to a New Host or Server With No Downtime

Are you frustrated with your current hosting provider? Has your site grown enough that you need to switch hosting or move to a different server? Having the risk of downtime and potential data loss worries most users. In this article, we will show you how to move your WordPress site to a new host or server with no downtime. The goal is to learn the migration process and make it painless and swift.

Important: Before we start, we want to remind you that most WordPress hosting companies offer free migration services. If they don’t publicly state that, then all you have to do is ask. Usually it’s free, but some may charge a very low cost. It’s low enough for most folks to afford.

Step 1: Choosing Your New WordPress Host

Moving your site to a new web host is a time consuming process. It is important that you choose your WordPress hosting provider carefully.

If you are looking for a shared hosting provider, then we recommend you to go with Bluehost. They are one of the official WordPress hosting providers. Not to mention with our Bluehost coupon, WPBeginner users get 50% off and a free domain name.

If you’re looking for cloud hosting or location specific providers, then we recommend you to check out Siteground. They have data centers across 3 different continents.

If you’re looking for dedicated servers, then we recommend you check out InMotion Hosting. Their commercial class servers and support is amazing.

Step 2: Backup Your Site

First thing you need to do is install and activate BackupBuddy plugin on the website that you want to move. BackupBuddy is a premium (paid) plugin that we highly recommend. It offers complete automated backup solution for WordPress websites, and we wrote about how to use BackupBuddy earlier on WPBeginner. However, in this article we will show you how to use it as a website migration tool for your WordPress websites.

Once you have installed and activated BackupBuddy, go to BackupBuddy » Backup. If you have just installed the plugin, then you will see a quick setup wizard.

BackupBuddy Quick Setup Wizard

On the quick setup wizard, provide your email address. After that you need to enter a password which will be used when you migrate your site. The next option is to choose a location to store your backup. BackupBuddy supports local backups (stored on your webserver), BackupBuddy Stash, FTP, Amason S3, Rackspace, Dropbox, or Email.

The last option in the wizard is how often do you want to Backup your site. Choose an option that suits your need and Save your settings.

Now BackupBuddy will start creating your first backup. Once it is done, you can click on the Download button to download your backup or click on the send button to send the backup to the location you choose in the setup wizard.

For users who have BackupBuddy pre-installed, you just need to create a complete backup of your site.

Step 3: Migrate Your Site

To migrate your site, you need a copy of importbuddy.php and the latest complete backup of your site in a .zip file. To download both files, you need to visit BackupBuddy » Restore/Migrate. Click on the Download importbuddy.php button to download importbuddy.php file.

Download importbuddy

If you have not already downloaded your database backup, then scroll down on the migrate page and you will see your latest database. Take your mouse over to the database and then click on the download link.

Download your backup zip file

Once you have downloaded both files, the next step is to upload them to your new web host. Connect to your new web host using FTP.

Note: In your FTP URL, you would need to put the IP address of your new host instead of your domain. This is to ensure that these files go to the new host rather than the old host.

You need to upload both importbuddy.php file and your backup .zip file to the root directory of your website. This is usually /username/public_html/ or /username/public_html/ where is your domain name.

Make sure that your root directory is empty. If you have WordPress installed in your root directory, then you need to delete it first.

Step 4: Preparing for Migration Wizard

Once you have uploaded both files to your new host, you need to access the importbuddy.php file in a browser. The importbuddy file can be accessed using a URL like this:

However, right now the URL will take you to your old web host and you will get a 404 error. This is because your domain name is still pointing to your old web host.

Normally, folks will tell you to change your domain nameservers and point to your new host. However that will result in your users seeing a broken website as you migrate it.

We will show you how you can access your new site temporarily on your computer without affecting your old site.

Changing The Hosts File

The hosts file tells your computer to map domain names to specific ip addresses. In this step, we will show you how to add an entry for your domain name in the hosts file, so it points to your new host.

Making these changes will allow you to access the files on your new host using your own domain name whereas the rest of the world will still be accessing your site from the old host. This ensures 100% uptime.

The first thing you need to find is the ip address of your new host’s server. To find this, you need to log into your cPanel dashboard and click on expand stats link in the left-hand sidebar. This will expand the sidebar showing you information about the status of your server. The information you need to copy is the Shared IP Address.

Finding your server's ip address in cPanel

In the next step, Windows users need to go to Programs > All Programs > Accessories, right click on Notepad and select Run as Administrator. Windows UAC prompt will appear, and you need to click on yes to launch Notepad with administrator privileges.

On the Notepad screen, go to File > Open and then go to C:\Windows\System32\drivers\etc. Select hosts file and open it.

Mac users will need to open the Terminal app and enter this command to edit hosts file:

sudo nano /private/etc/hosts

At the bottom of the hosts file, you need to enter the ip address you copied and then enter your domain name. Like this:

Replace the IP address with the one you copied from cPanel, and with your own domain name. Save your changes, and you can now access your files on the new host using your domain name on your computer.

Important: Don’t forget to undo the changes you made to hosts file after you have finished the migration (step 5).

Step 5: Running The Importbuddy Migration Wizard

To run the importbuddy migration wizard, you need to run it in a browser window. It is located at:

Replace with your own domain name. First, You will be asked to provide the password you created during the BackupBuddy setup wizard or the password you created for this particular importbuddy.php file.

Enter your backupbuddy password

After entering the password, you will enter the first step of the import wizard. Importbuddy will automatically display the database backup you have uploaded. Click on the next step button to continue.

Importbuddy migration wizard

Importbuddy will now extract the contents of your backup file. Once it is done, you need to click on the next step button to continue.

On the next screen, importbuddy will show you the URL and database information. It will show you the URL where your backup was created. If you are just changing web hosts without changing domains, then it will be the same for both old and new site. In case you are moving from one domain name to another, then it will reflect the change.

Site URL information in importbuddy

Below URL settings, you will see database settings. If you have not already created a database on your new host, then it is time for you to create one. Once you have created the database, you will need to enter the database information in the fields below and then click on Test Database Settings button.

If importbuddy fails to connect to your database, then check the values you entered above and make sure they are correct. Once you have successfully connected to your database click on the next step button to continue.

Enter your new database information for migration

Importbuddy will now import your database. When it is done, click on the next step button to continue. In the step 5 of the migration wizard, ImportBuddy will update your URLs and paths. Once it is done, you will be asked to verify your site’s functionality by clicking on the site’s URL.

That’s all, you have successfully migrated your website. Make sure everything is working fine by browsing through your site.

ImportBuddy will show you some links to the common problems and how to fix them. Once you are satisfied that everything is in order, it is time to clean up the migration files. Simply click on Clean up & remove temporary files button.

Cleaning up importbuddy migration files

You will get a 404 error, which is normal and indicates that importbuddy.php script has been removed from your server.

Important: Now you can remove the changes you made to your hosts file.

Step 6: Switching Nameservers

When moving your site to a new host, you need to switch your DNS nameservers. This ensures that your users are taken to the new location of your website.

If you registered your domain with your hosting provider, then it’s best to transfer the domain to the new host. If you used a domain registrar like Godaddy, Namecheap, etc, then you need to update your nameservers.

You will need the nameserver information from your new web host. This is usually a couple of URLs that look like this:

For the sake of this guide, we will be showing you how to change DNS nameservers with GoDaddy. Depending on your domain registrar or web host, the screenshots may not reflect the setup on your registrar or web host. However the basic concept is the same. Just look for domain management area and then look for nameservers.

First you need to login to your account and then click on the launch button next to domains.

Launch domains

On the next screen, click on your domain name. You will see your domain details, along with your nameservers. You need to click on the manage link under the nameservers.

Manage nameservers

On the next screen, you will see a link to enter custom nameservers. Clicking on the link will open a form where you can enter your custom DNS nameservers.

Entering nameservers

Save your changes and you are done.

You have successfully changed the nameservers. These changes can take 4 – 48 hours to propagate through out the world.

Now since you have the same content on your old host and the new host, your users wouldn’t see any difference, and your transfer would be seamless with absolutely no downtime. You can cancel your host hosting account after 3 days of your migration.

We hope that this step by step guide helped you move your WordPress site from one host to another with no downtime whatsoever. If you come across any issues, then check out our guide on the most common WordPress errors and how to fix them.

If you liked this article, then subscribe to our YouTube Channel for our WordPress video tutorials. You can also follow us on Twitter and Google+.

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. Page maintained by Syed Balkhi.

WPBeginner's Video Icon
Our HD-Quality tutorial videos for WordPress Beginners will teach you how to use WordPress to create and manage your own website in about an hour. Get started now »


  1. Tanisia says:

    I’ve tried for four hours to make these instructions work. The result? Now I can’t access my site at my old host. I tried following the directions on this 2-year-old article (will there be an update, since BackupBuddy has evolved?) and now everything is messed up.

    I used FTP to upload the files, and edited the host file as instructed, but the ImportBuddy PHP script won’t run. It just shows me the code. I tried contacting Bluehost for assistance, and they were no help. So I tried setting all my other settings back to where they were before I started this odyssey, and now I can’t see my site at all. Not the Admin panel, nothing.

    • WPBeginner Support says:

      Tanisia, please refer to our guide on what to do when you are locked out of WordPress admin area.

      • Tanisia says:

        I’m back in at my old host – my servers needed to re-propagage from Bluehost, and it took longer than I had anticipated. I’m still left with BackupBuddy not working the way it’s supposed to. Again, do you have updated instructions from 2014, since there have been several updates to BackupBuddy since this was written? When I did the Notepad update in Windows 10, it looked different from what was described here, so I couldn’t be sure if that trick worked.

        Thank you for answering back.

  2. Fahim says:

    If it was a primary domain , can i follow this Process? I need to move and that domain is Main/primary domain, how can i move,will u plz help me?

  3. Mark says:

    Just stuck i step 4, can i just simply addon domain and change dns in new host, ? Following that, C:\Windows\System32\drivers\etc. , there is nothing in my etc, nothing like hosts file, btw great tutorial easy to fallow, thanks

  4. Jacob says:

    I was hoping there would be an easier way to do it with a third party service, but I’m not about to shell out 80 bucks just to do that.

  5. Ash says:

    The backupbuddy steps in the new version have changed quite a bit. Nothing to be afraid of though. I was able successfully migrate from t1.micro on aws to t2.small instance. So far so good.

  6. David says:

    A few questions for you:

    1. Isn’t there a SIMPLE way to back up one site (themes, child themes, plugins, and post data), then restore it to another site?

    It truly should be as simple as (a) Backup To (dropbox, then (b) Restore From (dropbox

    2. Is it possible, perhaps even EASY, to develop a client’s WP site on your development server, then use Backup Buddy (or some other backup/restore program) to migrate it to the client’s site?

    3. Does Backup Buddy, or any other backup/restore program you know of, give you the ability to restore to an existing WP installation? In other words, can you set it to restore everything except the WP core files?

    Thanks for this article.

    David in Mississippi

    • WPBeginner Support says:

      Actually, in the article we have shown how BackupBuddy does exactly what you are asking for. You simply backup your site, download an archive file and an importer file. Upload these files to the new location and run the script. Hope this helps.

    • Ash says:

      @David, with backupbuddy you can choose which files to leave out while backing up. So you can leave out the core WP files.

  7. Robert says:

    hi guys,

    A friend just make me a new wordpress website and uploaded it to my hosting account. Now, I want to change the domain and hosting account and want to upload the website to the new hosting account.
    My friend sent me the archive with all files of the website including database. How is possible to upload the website to my new host?
    I appreciate your answer.

    thank you

  8. Ricardo Clarke says:

    I actually just went through this process yesterday and need to transfer another site today. This is hands down the most thorough walkthrough I’ve seen. The 4 to 48 timeframe really helped ’cause I thought something went wrong, but the transfer just needed time to propagate across the interwebs.

  9. WPBeginner Staff says:

    As soon as you figure out that your new domain has regained the search positions for your old site. We hope that you have setup 301 redireccts on old domain otherwise search engines wouldn’t know that your old content has moved to the new domain permanently.

  10. WPBeginner Staff says:

    What’s the shorter way of doing this?

    • Sebastien says:

      Hi there, thanks for your tutorial, here’s an other way of doing it… free.

      1. Tools > export posts and pages from admin panel. If you also need the DB phpMyAdmin export tables from the db. Import them in the new db. Check for the extension of the tables to be the same (_wp for instance)

      2. edit your virtual host config file, add what follows between your server {}

      allow your_public_ip;
      deny all;

      3. Access the site by its ip. (make sure you set the ip of your new server instead of the url in phpmyadmin > wp_options > siteurl and home options)
      4. Tools > import posts and pages
      5. Change your DNS records at the old host.
      6. Done. Use another plugin like UpdraftPlus to backup for free.

  11. Rachel Charles says:

    Clean and modern and Easy to modify!

  12. Kate_H says:

    Great guide. I can confirm these steps work brilliantly as I recently moved a 5 year old WP site from one domain to another domain and swapped web hosts as well.
    The only difference I did was redirect the old site to the new site via the .htaccess as I wasn’t migrating the old domain name over at the time.
    Out of curiosity how long would you leave it before deleting all the old content from the old domain and setting up a permanent URL redirect via your registrar?

  13. zimbrul says:

    I really hate Backup Buddy. In 80% of cases I got errors and their support is not that good. I’d rather move a site with Duplicator free WordPress plugin

    • WPBeginner Staff says:

      Zimbrul, Duplicator is a nice plugin too. However, we have moved many WordPress sites using BackupBuddy and it has always worked flawlessly for us. That’s why we recommend it.

    • Jim says:

      Fully agree. Duplicator has never let me down and I have backed up and installed to many websites to count. No need for a paid plugin.

  14. Dennis Does Cricket says:

    That’s a ridiculously long winded way of doing it.

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.