blog
Implementation of HTTP Digest Authentication in PHP »
Migrating WordPress to a new URL
WordPress is a nonsense, and stores it’s URL in multiple places in the database. If you want to move your WordPress install to a different host, exec the following MySQL commands to change the URL in all instances:
UPDATE wp_options SET option_value = REPLACE(option_value, "[Old site URL]", "[New site URL]") WHERE option_value LIKE "%[Old site URL]%"; UPDATE wp_posts SET post_content = REPLACE(post_content, "[Old site URL]", "[New site URL]") WHERE post_content LIKE "%[Old site URL]%"; UPDATE wp_posts SET guid = REPLACE(guid, "[Old site URL]", "[New site URL]") WHERE guid LIKE "%[Old site URL]%";
Replace [Old site URL] and [New site URL] appropriately
Tags: database, mysql, url, wordpress
This entry was posted on 2010.07.06 at 15:48 and is filed under Blog, SQL. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
Leave a Reply
archives
- July 2010
- May 2010
- February 2010
- January 2010
- December 2009
- December 2008
- October 2008
- August 2008
- May 2008
categories
- Blog (1)
- Grinds My Gears (5)
- Hosting (2)
- JavaScript (1)
- PHP (1)
- Sports (1)
- SQL (1)