Skip to content

Instantly share code, notes, and snippets.

@samsargent
Created December 10, 2012 06:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samsargent/4248885 to your computer and use it in GitHub Desktop.
Save samsargent/4248885 to your computer and use it in GitHub Desktop.
Dev to production domains in Wordpress
update `wp_options` set `option_value` = replace(`option_value`,'website.dev','beta.example.com');
update `wp_posts` set `guid` = replace(`guid`,'website.dev','beta.example.com');
update `wp_posts` set `post_content` = replace(`post_content`,'website.dev','beta.example.com');
update `wp_postmeta` set `meta_value` = replace(`meta_value`,'website.dev','beta.example.com');
/*
Going from a development domain to a beta or production url - updating your wordpress database in a few queries. There may or may not be other tables/settings that should be update. I've found the above to work for me.
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment