Whenever I talked about WordPress hosting, I always mentioned that WordPress is memory hogging CMS, and you should always go for a Webhosting, which is optimized for WordPress hosting. Mnay newbies make mistae by picking the hosting based on price which is not the right decision as you should consider both Price & hosting quality to make the right decision. Here are those webhosting which has proven to be best for WordPress & is also affordable.

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.

One of my WordPress clients wanted to move 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.

Moving WordPress Site to New Host (Hostgator Server): Handy Guide

Alright so it’s time to start leaving 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.

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

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

In this tutorial, we will be moving 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 can take help of WP Sweep plugin to do all this quickly

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

You can Install WP-Db Manager plugin and optimize 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 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 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 be creating 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

How To Move WordPress Site To New Host.

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.

How To Move WordPress Site To New Host.

How To Move WordPress Site To New Host.

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

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

So, we are almost half way 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 alright 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.

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 old hosting.


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/domain.com/wp-content

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.

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 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:

How To Move WordPress Site To New Host.

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 root of your WordPress installation (Keep a backup of file before) and edit the details:

How To Move WordPress Site To New Host.

Also, search for 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:

How To Move WordPress Site To New Host.

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 nameservers.

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 be facing 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 all together.

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.

Moreover, this tutorial looks technical, but once you start moving WordPress blogs, you will realize it won’t take more than 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. Something, which I offer under my WordPress services, from long and it makes decent money with an hour of work.

Quick recap:

  • Take back up of WP-content and Database on old server
  • Edit Hosts file on Local Computer
  • Install WordPress on new Hosting server
  • Upload WP-content folder
  • Create Database, user, and password
  • Import Database
  • Update WP-config file on new server
  • Verify everything
  • Update Nameserver to point to new hosting
  • Share this post

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


Comments (31)

  1. administratiekantoor


    Very shortly this web site will be famous among all blog viewers, due to it’s good posts

  2. Acryl nails


    Wow, superb blog structure! How long have you ever been running a blog for?

    you make blogging glance easy. The full look of your web site is fantastic, as
    neatly as the content!

  3. Clarence Scheiblich


    Content has long been master, appears the black hats are getting owned by the white hat profiteers

  4. Reply

    Hi, I just looked at your blog and really impressed by it’s design and data. You are doing a nice job by providing such info to the world. Thank you so much.

  5. Reply

    It is appropriate time to make some plans for the longer term and it’s
    time to be happy. I’ve read this submit and if I could I wish to recommend you some attention-grabbing issues or
    advice. Perhaps you could write subsequent articles
    regarding this article. I want to learn more things approximately it!

  6. Reply

    I like the valuable info you provide in your articles.
    I’ll bookmark your blog and check again here frequently.
    I am quite certain I will learn many new stuff right here!
    Best of luck for the next!

  7. Reply

    An outstanding share! I’ve just forwarded this onto
    a friend who was doing a little homework on this.
    And he in fact ordered me breakfast due to the fact that I discovered it for him…
    lol. So let me reword this…. Thank YOU for the meal!!

    But yeah, thanks for spending some time to discuss this subject here on your blog.

  8. Reply

    Pretty nice post. I just stumbled upon your blog and wished to say that I’ve really enjoyed surfing around your
    blog posts. In any case I’ll be subscribing to your feed and I hope you write again very soon!

  9. Reply

    I was suggested this website by my cousin. I’m not sure whether this
    post is written by him as nobody else know such detailed about my difficulty.
    You’re incredible! Thanks!

  10. Reply

    Hiya! Quick question that’s totally off topic.
    Do you know how to make your site mobile friendly? My website looks weird when viewing from my iphone 4.
    I’m trying to find a theme or plugin that might be able to fix
    this issue. If you have any recommendations, please share.

  11. Reply

    With havin so much content and articles do you ever run into any problems of plagorism or copyright infringement?
    My blog has a lot of completely unique content I’ve either written myself or outsourced
    but it looks like a lot of it is popping it up all over the internet without my agreement.
    Do you know any ways to help reduce content from being ripped off?
    I’d certainly appreciate it.

  12. Reply

    What’s Going down i am new to this, I stumbled
    upon this I’ve discovered It absolutely helpful and it has aided me out
    loads. I’m hoping to contribute & help different users like its helped me.

    Good job.

  13. Reply

    Right here is the right website for anybody who hopes to find
    out about this topic. You realize so much its almost tough to argue with you
    (not that I actually would want to…HaHa). You certainly put
    a brand new spin on a topic that’s been discussed for
    many years. Wonderful stuff, just excellent!

  14. g


    Hi! I’m at work browsing your blog from my new iphone 3gs!
    Just wanted to say I love reading your blog and look forward to all your
    posts! Keep up the outstanding work!

  15. g


    Heya are using WordPress for your site platform?
    I’m new to the blog world but I’m trying to get started and
    set up my own. Do you require any html coding expertise
    to make your own blog? Any help would be greatly appreciated!

  16. g


    Pretty nice post. I simply stumbled upon your weblog and wanted to say that I have really enjoyed browsing your weblog
    posts. In any case I’ll be subscribing on your rss feed and I’m hoping you write again very

  17. Reply

    This is really attention-grabbing, You are an overly skilled blogger.
    I’ve joined your rss feed and stay up for in quest of more of your magnificent
    post. Additionally, I have shared your web site in my social networks

  18. Reply

    One thing I want to say is always that before purchasing more laptop memory, consider the machine in to which it can be installed. If your machine is definitely running Windows XP, for instance, the actual memory limit is 3.25GB. Applying more than this would purely constitute just a waste. Make sure one’s motherboard can handle an upgrade amount, as well. Good blog post.

  19. Reply

    Oh my goodness! Impressive article dude! Many thanks, However I am having issues with your RSS. I don’t understand why I can’t join it. Is there anybody else getting identical RSS problems? Anybody who knows the solution can you kindly respond? Thanx!!

Leave a comment

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