scriptygoddess RSS Feed
 
 
 
 

Moving a Wordpress Install

One of my clients recently purchased new servers and wanted to migrate all their sites to the new servers. Some of these sites were wordpress powered. Thankfully, I found this article that made the move a breeze.

The critical thing I want to save for my future reference is the following sql lines from that post:

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';
UPDATE wp_posts SET guid = replace(guid, 'http://www.old-domain.com','http://www.new-domain.com');
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.old-domain.com', 'http://www.new-domain.com');

See the post on My Digital Life for the full instructions :)

3 Responses to “Moving a Wordpress Install”

  1. 1
    taiyo:

    I was a little worried the first time I had to migrate a wordpress site too. But like you said it's actually very easy.

    I do it for my clients now all the time.

  2. 2
    Velvet Blues:

    We just released a plugin which makes dealing with SQL unnecessary. And it does update both the permalinks and the links in post and page content.

    Check it out at: http://www.velvetblues.com/web-development-blog/wordpress-plugin-update-urls/

  3. 3
    taiyo:

    @velvet
    Awesome! thanks for sharing that.

    For moving from one directory on a website to another one can just put a .htaccess redirect and that solves the old-links-in-posts problem. But for moving to a different url altogether your plugin is a lifesaver.

Leave a Reply

Bookmarks

WordPress Resources

Meta

Random Stuff