Migrating the Word Press Blog

image I never had any trouble with the WordPress Blog until recently.  Needed to migrate the blog to localhost to do some quick skinning when I realise how problematic that could be.  One of the problems with WordPress is that they tend to use full url links instead of relative links.  As such, the simple direct transfer of files and database dump just will not do.  Needed to do some direct tweaking on the database.

Thank god there were some helpful souls at:

http://www.mydigitallife.info/2007/10/01/how-to-move-wordpress-blog-to-new-domain-or-location/

 

Step 1

UPDATE wp_options SET option_value = replace(option_value, 'http://199web.com.sg/blog', 'http://localhost/wordpress') WHERE option_name = 'home' OR option_name = 'siteurl';

Step 2

UPDATE wp_posts SET guid = replace(guid, 'http://199web.com.sg/blog','http://localhost/wordpress');

Step 3

UPDATE wp_posts SET post_content = replace(post_content, 'http://199web.com.sg/blog', 'http://localhost/wordpress');

Leave a Reply

You must be logged in to post a comment.