How to move a WordPress blog to a new host

There are many different ways to go about when moving your wordpress installation to a new host. How to to it depends on a set of different factors. There is however a method that is both simple and yet applicable to all situations; for moving from a local installation, for moving to a new WordPress hosting provider, for moving to a new domain and so forth.

Follow these simple steps to change to a new hosting provider

  1. Dowload all the files using an FTP software like for example FileZilla (If you are moving a local WordPress installation you can disregard this first step.)
  2. Goto your current hosting providers cPanel for your account, navigate to phpMyAdmin locate the database for your blog and export it.
  3. Upload all files to your new directory
  4. Create a new database in your new hosting cPanel and import your old database into it
  5. Change details in wp-config.php to fit your new domain and database properties
  6. Goto to phpMyAdmin and run the following scripts to update the database with your new domain details:

Query To Update WordPress Settings

UPDATE wp_options SET option_value = replace(option_value, ‘http://www.old-url.com’, ‘http://www.new-url.com’) WHERE option_name = ‘home’ OR option_name = ‘siteurl’;

Query To Update Permalinks

UPDATE wp_posts SET guid = replace(guid, ‘http://www.old-url.com’,'http://www.new-url.com’);

Query to Update Any Links Embedded In Content

UPDATE wp_posts SET post_content = replace(post_content, ‘http://www.old-url.com’, ‘http://www.new-url.com’);

Don´t forget to replace old-url.com/new-url.com with your own data!

Comments
One Response to “How to move a WordPress blog to a new host”
  1. Amazing post thank you!

Leave A Comment