By Alpha Sisyphus

2011-06-06 19:16:06 8 Comments

I'm going to move my site from development/staging environment (i.e. to production environment (

Probably, existing links in my pages and posts will still point to the old url, i.e. how do i deal with this issue? is it possible correct all the links in one go? any suggestions?



@mike23 2011-06-06 20:35:44

What I do is make a dump of the database and then Search / Replace what I need either with a text editor if the DB is rather small (Geany is great for that) or if it's a big DB I use Regexxer Search Tool.

@markratledge 2011-06-06 20:09:52

See Moving WordPress « WordPress Codex

These are typical queries to run in phpmyadmin to change URLs, but you may also have serialized data in widget and theme options that will have to be changed, too:

UPDATE wp_options SET option_value = replace(option_value, '', '') WHERE option_name = 'home' OR option_name = 'siteurl';

UPDATE wp_posts SET guid = replace(guid, '','');

UPDATE wp_posts SET post_content = replace(post_content, '', '');

UPDATE wp_postmeta SET meta_value = replace(meta_value, '', '');

And Search RegEx is a good plugin to be able to search and replace with Grep through all posts and pages to check if any URLs were missed.

@Elpie 2011-06-07 13:01:06

Changing the GUID will cause feed readers to republish old content. The GUID is just an identifier for feed readers and is supposed to be unique. For most sites, its unnecessary to change it and for sites that have people subscribing to feeds its important not to.

Related Questions

Sponsored Content

2 Answered Questions

Moving Site From Development to Production

  • 2013-08-12 20:27:30
  • jgravois
  • 873 View
  • 0 Score
  • 2 Answer
  • Tags:   migration

2 Answered Questions

1 Answered Questions

[SOLVED] Moving a WordPress site from one folder to another (one domain, one server)

  • 2014-12-12 06:31:43
  • Roman Matveev
  • 1068 View
  • 1 Score
  • 1 Answer
  • Tags:   migration

3 Answered Questions

[SOLVED] Do you have any effective strategies for launching a v2 of a WP site?

  • 2010-08-12 01:09:55
  • Mike Lee
  • 277 View
  • 12 Score
  • 3 Answer
  • Tags:   migration

2 Answered Questions

[SOLVED] Server ip to Domain

2 Answered Questions

2 Answered Questions

[SOLVED] URL rewrite based on a custom field value

6 Answered Questions

Sponsored Content