Moving WordPress To Another Hosting Account

Two things, first

  1. Click here if you need instructions for moving a free WordPress.com blog to your own web hosting account.
  2. The instructions that follow are for moving self-hosted WordPress blogs from one hosting account to another.

IMPORTANT:  Read through all of this before you start.  If you don’t understand the terminology, it’s best to have the tech support team at the new hosting company do this for you.

Just like marriage, DO THIS AT YOUR OWN RISK!  Before I started messing around with a live blog, I created a test blog with an old domain name that I wasn’t using.  I practiced with it until I got the steps just right.  If you don’t have one, buy a hella cheap .info domain name at NameCheap for a couple of bucks.  Make it a practice domain that you ONLY use for testing like:  testname3984.info.

I’ve used these instructions may times over and they work.  If you run into problems with the new blog, don’t panic because your old one will still be there.  Just calm down and try to figure out what’s wrong.  It’s usually caused by a plugin.  If you run into errors, there are some things to look for in the “On new blog” section down below.  Good luck!

Best WordPress Hosting

To make sure you have a wonderful WordPress experience, do yourself a favor and get some decent web hosting.  I’ve used WebHostingHub, WebHostingPad, iPage, JustHost, SuperGreen, BlueHost, HostMonster and a few other little ones, but my WebHostingHub account works the best.  WordPress is database intensive and the Hub servers are optimized to take all those database hits.  Out of all of those I just named, WordPress runs the fastest on my WebHostingHub account.  They’ve got a 90-day guarantee.  That’s plenty of time to give them a try.  Oh, and they’ve got an A+ rating with the Better Business Bureau.

Make WordPress Run Faster

No matter which web host I use, I ALWAYS install two nitro burning go-fast plugins:

  • Use Google Libraries – Dramatically speeds up WordPress performance.  In fact, run your blog without it for a while and then install it so you can witness the speed increase.  This plugin allows your WordPress site to use the content distribution network side of Google’s AJAX Library API, rather than serving these files from your WordPress install directly.  I got this tip from a WordPress expert in the forum over there.  Blew me away when I tried it.  Free.
  • Quick Cache – Caching plugin that creates HTML pages for faster loading.  Automatically updates the pages when their changed.  Works with WordPress multi-site/networking installations.  Free.

Ready to start the move?  Engage!

On old blog to be moved:

  • Update WordPress to latest version.
  • Update any plugins that need to be updated.
  • Deactivate and delete any plugins you don’t want moved.
  • Empty post and comment trash.
  • Optional, delete post revisions.  (Use a plugin called Better Delete Revision.)
  • Optional, delete log files that some plugins create like ping logs, WP Robot log, etc.
  • Download via FTP the entire WordPress wp-content folder to your hard drive.  Contains themes, plugins, images.
  • Open the wp-content/wp-config.php file with a text editor.  Look for the DB_NAME entry.  Write down the database number:  yourusername_wrdp_____
  • In your web hosting control panel in MyPHPAdmin, locate that database and do an export with drop/create tables option checked.

Prepare new blog on new web hosting account:

  • Create addon domain using same domain name.
  • Install WordPress using same username/password as old blog.
  • Make note of the new database number wrdp____

On your computer after the wp-content download has finished:

  • Ping the primary domain on the new hosting account to get the IP address. _____._____._____._____
  • Right-click on text editor to Run As Administrator and edit the c:\Windows\System32\drivers\etc\hosts file.
  • Add a new line with the IP address from above, a space, then your domain name like this:  123.123.123.123 yourdomain.com and save the file.
  • Close browser, then reopen so new host record takes effect and is pointing to the new server.  Only you will see your blog on the new server, no one else.

On new blog:

  • Log into WordPress wp-admin.
  • Update WordPress to latest version if necessary.
  • In MyPHPAdmin, import the database backup into the new database (you wrote the number down above).
  • FTP the entire wp-content folder that was downloaded from the old blog up to the new account, over-writing the existing one.
  • After the file transfer is complete, in WordPress Dashboard, <F5> to refresh.
  • Check on theme.  Theme page may display default theme thumbnail.  Refresh page if needed.  Activate the correct theme if necessary.
  • Reactivate plugins if necessary.
  • Check for plugin errors.  Any plugin that was using an absolute path will need to be updated with new web server user account name.
  • Check on posts, pages, categories, media files to make sure the database imported ok.
  • Access the site from the browser.  Click on posts and pages to make sure they come up without errors.
  • If there are 404 file not found errors (permalink problems), were you running a cache plugin?  If so, delete and recreate the cache pages.
  • Still get errors?  Then install WP-DBManager plugin.  In WP-DBManager, Repair Database.
  • Make a slight change in the blog so you can tell the two blogs apart by adding a sidebar text widget at the bottom of the sidebar with some text like “x”.

On new hosting account:

  • Create your email accounts on the domain.  You will need to modify them on your email client, too, if you changed the password or the mail server names have changed.
  • Recreate any CRON jobs, auto-responders, etc.

On your computer after everything looks ok:

  • Edit the hosts file again (Run as administrator) to remove line that was added above.
  • Close, then reopen browser.

Flip the switch to activate the new blog:

  • Don’t delete anything off the old server just yet.  Wait a few days.
  • Replace the old DNS nameservers on your domain name to the new ones and save.  It usually takes 30 minutes to 2 hours to propagate.  Some hosts go faster than others.  You will not have any downtime because it will still be displaying the old site until the new site resolves.
  • To check if the new site is loading, look for the little ‘x’ at the bottom of the sidebar.  If not, give it more time.
  • When you are absolutely sure the new site is working ok, then you can go into your old account and remove the old site, but it’s not necessary. Unless, of course, you’re over your inode limit.

If you successfully used these steps and you now feel like you can rule the world, leave a comment.  Also, click the Google+ button at the top of this article to let the world know this was awesome.

As usual, spammy cheerleading comments from backlinkers will be deleted.  Offer up something useful.  Unfortunately, don’t ask me to troubleshoot anything.  I’m not your hosting’s tech support, just a blogger like you.

 
 
Share
WebHostingHub 1-Click WordPress Installation - Host Unlimited Websites and Blogs on the Same Account
Archives
The biggest free web hosting accounts. No ads. No strings. No tricks.