kieranbarnes Independent PHP, WordPress & CubeCart Programmer

How to move WordPress directory or server – properly

Posted on August 24, 2008

I ran into an annoying, but easily avoided problem the other day. When moving a clients WordPress site from the development/staging area to it's live domain, I did the usual update "WordPress address" and "Blog address" in the WordPress settings.
Thats all you need to do, right? No.

If you've got images and links in your posts, like my client did, they will still reference the development URL. The full URL path is stored in the WordPress database tables.

Running this SQL will easily sort it out.

UPDATE wp_posts SET post_content = replace(post_content, 'http://OLD_DOMAIN', 'http://NEW_DOMAIN');

Another 60 second fix!


Related posts

  1. [Snippet] Manually reset a WordPress password
    WordPress stores user passwords in MD5 checksums, so using your SQL admin tool of choice...
  2. WordPress/Shopp Shipping Calculator/Options Access-Control-Allow-Origin Error
    I've recently been debugging a customer's WordPress/Shopp store. When the customer set the Cart &...
  3. Crawl Rate Tracker and WordPress 2.5 Manual Fix
    A quick update on people that need the Crawl Rate Tracker to work with WordPress...
  4. WordPress function remove_menu_page
    WordPress is now being used more and more for a full site CMS and the...
  5. Rebranding WordPress 3.2
    Woah. The new WordPress 3.2 admin interface is much better! Theres a lot of much...

Comments (2) Trackbacks (0)
  1. Yep, a nice 60 second fix. Unfortunately, I find that many people are a bit wary of using SQL.

    We just released a plugin which simplifies the process for the average new-to-the-world-of-WordPress user.

    It’s at http://www.velvetblues.com/web-development-blog/wordpress-plugin-update-urls/

    The plugin also updates all permalinks. (ie. the ‘guid’ column)

  2. Thanks for the tutorial, i already move my blog.

    Dini


Leave a comment

(required)

No trackbacks yet.