Moving a WordPress website to a new location/host

moving wordpress site

After copying files and db content:

  1. Edit wp-config.php with new db content
  2. edit .htaccess (if parent folder name of wp has changed)
  3. using phpMyAdmin (as instructioned in the above link)…
  4. update all absolute URLs to new domain eg.
    UPDATE wp_options SET option_value = replace(option_value, ‘http://www.old-domain.com’, ‘http://www.new-domain.com’) WHERE option_name = ‘home’ OR option_name = ’siteurl’;
  5. UPDATE wp_posts SET guid = replace(guid, 'http://www.old-domain.com','http://www.new-domain.com');
  6. UPDATE wp_posts SET post_content = replace(post_content, 'http://www.old-domain.com', 'http://www.new-domain.com');

Tags: , ,

Leave a Reply

You must be logged in to post a comment.