How To Move WordPress Site To New Host With Zero Downtime


Whenever I talked about WordPress hosting, I always mentioned that WordPress is memory-hogging CMS, and you should always go for a Web hosting, which is optimized for WordPress hosting. Many newbies make mistake by picking the hosting based on price which is not the right decision as you should consider both Prices & hosting quality to make the right decision.  Here are the best WordPress hosting that you should be using.

If you are looking to move WordPress site to new hosting, this guide will help you understand what all files to move & how to do it yourself. Before we move to the steps of moving WordPress hosting, let me share the backstory behind writing this DIY tutorial.

Move WordPress Site To New Host
  • Save

One of my WordPress clients wanted to move a WordPress blog from Dreamhost to Hostgator, as Hostgator is one of the best alternatives for Dreamhost. Here I will share the complete step by step tutorial to move WordPress site to a new host.

In this case, DreamHost uses custom cPanel, and HostGator uses standard cPanel.

Most of the popular Web hosting companies like Bluehost, SiteGround offers standard cPanel, so if you are moving to any cPanel hosting, this guide will help you to migrate WordPress site.

How to Migrate WordPress Site to New Hosting (Hostgator Server): Handy Guide

Alright, so it’s time to leave your crappy hosting & moving to new hosting for your WordPress blog. In this tutorial, I’m taking the example of HostGator hosting & the process would be similar for almost all the web-hosting companies.

So, I assume you already have purchased HostGator hosting, and if not, you can use coupon code “ShoutMeLoud30” to grab 30% off on the total bill.

Grab Hosting from HostGator now> (30% discount)

Now, we need to make sure everything moves with no downtime. I also suggest planning out a day like a weekend, when your website gets the least traffic.

This is to make sure; you will not lose any comments or guest post while migrating.

In this tutorial, we will move two things:

  • WP-content folder from the old host
  • Database of your WordPress site
  • Taking backup of WP-Config file

Information and tool you need to keep handy:

  • New Hosting Info
  • Old Hosting Info
  • FileZilla or any other free FTP tool

On DreamHost: Old hosting

Before we export wp-content and database, here we will be doing a couple of things.

  • Delete all previous database backup
  • Delete all Cache files (Empty cache option in your cache plugin)
  • Delete all unused plugins & themes
  • Delete all Spam comments, Trash comments, and trash posts. You should follow my tutorial on optimizing WordPress database to reduce the DB size. This will help in faster and error-free migration.

We are doing so many cleanups to make sure your database and wp-content size could be as small as possible.

After cleaning the database and after optimization, take a backup of WordPress database. If your database size is huge, use the gZip compression else take backup in .SQL format.

Another thing which we need to take the backup of is the WP-content folder. If you are using cPanel hosting, you can simply log into file manager from cPanel and compress your wp-content folder and take a backup, or use any FTP client and take the backup of your wp-content folder.

On HostGator: New Hosting, where you want to move WordPress

So far, at DreamHost hosting, we have taken a backup of WP-content and WordPress Database, and that is all we need to move ahead. You should also download WP-config file which is in the root folder of your FTP.

Now let’s prepare our new hosting for moving WordPress site.

Login to HostGator cPanel or new hosting account and Install WordPress on it. You can follow this guide to Install WordPress using Fantastico. Along with this, we will create a separate database and a user and associating that user with Db with all the privileges.

Create a Database + User + Associate:

Login to your cPanel and click on Database >MySQL Database Wizard

Create Database
  • Save

Here you will be giving a name to your database, creating a MySQL user & password and associating the user with that database. Note down all the details in a notepad, as we will need it later to make changes in the wp-config file.

WordPress Database user & pass
  • Save
Database Privilage
  • Save

So, here is the detail of the newly created database and all associated details:

  • Db Name: unikaman_SML
  • Db user: unikaman_SML
  • Db password: _xzB-[Cbph.*

So, we are almost halfway with our WordPress hosting migration and now start the hard part. Since our goal here is to move WordPress hosting with 0 downtimes, so we will first check everything is all right before migration. For this, we will edit our Windows hosts file, and point our domain to HostGator server.

On HostGator cPanel, left side bottom you can find the I.P address of your hosting account and edit your hosts file to point to that I.P. This guide will help you to edit your host’s file and here is what my hosts file look like, replace the domain name with the real domain that you are migrating.

0 downtime migration
  • Save

What this will do is, it will let you see your site on new Web-host on your machine, whereas, everyone else in the world will see your site running on the old hosting.

Now, open FTP and login to new hosting FTP. Upload all the content of the WP-content file (Backup from the old host) to your new hosting at the same location. public_html/

And on your hosting cPanel, go to Database > PHPMyAdmin >Select the database from Left side > Import and upload the backed up database file from old hosting.

Import WordPress Database
  • Save

If your database size is too huge and can’t be imported by default PHPMyAdmin importer, we will use a 3rd party tool call Bigdump.

If you need a tutorial for importing huge WordPress database, let me know, and I will write a separate tutorial for the same.

After importing is finished, click on Structure and note down the database prefix. Here is an example:

WordPress Db prefix
  • Save

So, in this example migration, my WordPress DB prefix is: wp_7agot7_

Once it’s done, all you need to do is edit wp-config file and add the database information that we created above: Open your wp-config file from the root of your WordPress installation (Keep a backup of file before) and edit the details:

Editing wp-config file
  • Save

Also, search for q following line in wp-Config.php file: $table_prefix  = 

And replace the prefix with, our Db prefix which we have found using Structure under your PHPMyAdmin. Example:

WordPress Database Prefix
  • Save

Once you have done everything as mentioned in this tutorial, your site should be successfully migrated to new hosting. Now, all you need to do is verify all settings and make sure everything is working fine. Once you are sure about everything is working fine, go ahead and update Domain name servers to point to new hosting and in this case, it’s HostGator name servers.

Possible problem & solution after WordPress host migration:

After moving WordPress Webhosting company, your directory structure is changed. So, few of your plugins might not be working, or you might face a few issues. Here are some of the common problems which you might face, and here are the solution to those problems:

Weird Character problem:

After migrating MySQL database, you will notice some weird character in your WordPress blog in the new host. For example, characters like:  Â and ’.

You can use Search and replace WordPress plugin, to find all such weird characters and replace them altogether.

Image Upload problem:

After hosting migration, since your directory structure is changed you might get an error uploading new images. You need to go to Settings > Media under WordPress dashboard and edit the location of the WP-content directory under “Store uploads in this folder” options.

Similarly, you need to make changes for WP-DB manager or any other database backup plugin you are using to store the database on your server.

Also, take a note of .htaccess file, as most of the time you end up having a faulty or empty .htaccess file, which gives 404 error for all internal pages. You might like to reset your WordPress cache plugin, to update the .htaccess code.

This tutorial looks technical, but once you move WordPress blogs, you will realize it won’t take over 30-45 minutes for a perfect migration. However, time may differ based on the size of the database, wp-content folder, and your skills.

In fact, many of you can consider starting a service based on the same, and you can charge from 50-100$ for a hosting migration.

Quick recap:

  1. Take back up of WP-content and Database on the old server
  2. Edit Hosts file on Local Computer
  3. Install WordPress on the new Hosting server
  4. Upload WP-content folder
  5. Create Database, user, and password
  6. Import Database
  7. Update WP-config file on new server
  8. Verify everything
  9. Update Nameserver to point to new hosting
  10. Enjoy your website on new hosting

Update: You can also use WP Duplicator plugin to migrate WordPress blog. Here is a tutorial.

I hope this tutorial will help you to move WordPress site with Zero downtime, but if you are stuck anywhere, don’t forget to give me a shout for help via comment. If you find this tutorial useful, don’t forget to share it on Twitter and Facebook.

For further reading:

Subscribe on YouTube

  • Save
Authored By
A Blogger, Author and a speaker! Harsh Agrawal is recognized as a leader in digital marketing and FinTech space. Fountainhead of ShoutMeLoud, and a Speaker at ASW, Hero Mindmine, Inorbit, IBM, India blockchain summit. Also, an award-winning blogger.

43 thoughts on “How To Move WordPress Site To New Host With Zero Downtime”

  1. NMPattnaik

    I need to migrate my localhost website to a live server. Do you have a post on this and on the best tools for it? Any writings on manual migration?

  2. ashok

    Dear Harsh,

    Hosting of my site recently got expired.Now I want to move my site to another server.Is it possible since I am unable to login to my WordPress admin panel also.

    Please suggest a remedy.

    1. Harsh Agrawal

      You need to have access to your old hosting or atleast Complete WordPress backup. If you don’t have these, then you should better renew your old expired hosting else you would lose access to your site. You can renew for one month of minimum possible tenure & then move your site to a new hosting server.

  3. Ravijit Chavda

    Hey Harsh.

    This is useful guide but I think plugins can do our work much easier.

    Duplicator plugin can migrate WordPress within minutes. I also tried it on https://www.bloggingbook. net What you say?

    Thanks πŸ™‚

  4. Sunil Prabhakar

    Hi Harsh,
    Thanks for very nice information, I would like to know how to transfer hosting from Bluehost India to Bluehost US. Your latest post “How To Cancel Bluehost India Hosting & Get A Complete Refund” is really useful for me, I have Bluehost India hosting and wish to move bluehost US hosting. please advice.. Thank you very much.

  5. Naveen Rana

    Hello harsh, my website is on and I want to migrate it on blue host and iam clueless on what to do, is there any article which can help on that? I been looking your website and it’s a great help and learnt a lot but iam really new in this field and migration of website seems a long task.
    Will domain name be migrated automatically and so far most of my article are on first page of google and you think it can affect my SEO ranking. Also wat about security? support says, security can be issue with new host.

  6. Chiranjit Dey

    Thank you Sir, Just followed your tutorial to transfer my site for 1st Time.

  7. Adesanmi Adedotun

    Hi Harsh,

    I’m having a little problem here which is giving a headache. I have successfully uploaded the needed files and connected my database in config.php. In the first place it was giving CONNECTION TO DATABASE ERROR after which it turns to “The page isn’t working is currently unable to handle this request.
    HTTP ERROR 500”.
    Meanwhile this only happened at my end since I haven’t change the site DNS… Could you suggest a way forward for this?

  8. Saifuddin

    Thanks …Now my blog is on free bytehost hosting i want to move to hostgator…This article is very helpful for me..

  9. Rahul Chaudhari

    Thanks for the detailed information Harsh.
    I have found what I wanted and moved my Site from Godaddy to Hostgator in couple of hours (not to mention the the Internet downtime as usual πŸ˜‰ )

  10. hendrat

    Thanks Harsh, I initially confusion to move my website to a new server, but after reading the tutorial you wrote I understand, your writing is very helpful, I love it πŸ™‚

  11. Santanu

    Thanks for this awesome guide Harsh. Recently I have migrated my website to Bluehost and also shared a detailed step by step guide how one can easily migrate a website to new hosting in few minutes only. I spend quite a long time to learn this and now feeling really good after executing these steps and able to transfer my site successfully.

  12. Muhammad Asyrof

    Hello Harsh, thank you for the information. But, I’ve found on another website that it can be much easier with Duplicator plugin. I just want to suggest you to add Duplicator tutorial as alternative.

    Overall, thanks so much for all you wrote on your site. I am a big fan of

  13. Bright Joe

    Thanks bro for the awesome guide, plus that video tutorial is so helpful. I’m migrating my blog to a new host, but had like 45 blog posts, and as it’s my first time migrating a site from one host to another, I needed a very greatly explained guide, and I found this the best!

    Thanks again, you always help somehow! πŸ˜€

    Have a good day bro!

    1. Harsh Agrawal

      Hey Joe,

      Hope this article helped you. Would love to hear your experience.

  14. Gaganjot Singh

    Recently i migrate my blog from godaddy to hostgator with this method. Its really helpful. After migrate wp db manager plugin shows errors and i uninstall it and install again. I faced Image uploading problem when write a new post and i change old location to new. working fine everything.

  15. Harry Genseti

    Hi Harsh,

    thanks your article really helpfully for me, cause I just started my new blog and i have problem with the hosting.

    Regards. πŸ™‚

  16. Prabhudatta Sahoo

    Hey There Experts,

    I am having some issues with my thumbnails. I recently migrated my websites from one host to another host and after migrating the files, I can see that the thumbnails are not showing up as expected. My thumbnails are mapped to the post featured image and after migrating all the featured images are gone. Even I tried the plugin Regenerate Thumbnails and some other similar to that plugin but it did not help. I tried to do the mapping manually but it is not possible for me to go and map each post. Also in the Wp-admin area the images are not showing up properly, it is coming as black spots where as using the URL of the image it correctly works. Could you please provide any solution to this? Thank you so much for your help in advance in this regards.

    Best Regards,

Leave a Comment

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

Scroll to Top