Skip to content

Instantly share code, notes, and snippets.

@dcalhoun
Created March 20, 2013 21:02
Show Gist options
  • Save dcalhoun/5208401 to your computer and use it in GitHub Desktop.
Save dcalhoun/5208401 to your computer and use it in GitHub Desktop.
WordPress queries shortcut for SequelPro.
UPDATE wp_options SET option_value = replace(option_value, '${1:OLD_SITE_URL}', '${2:NEW_SITE_URL}') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, '$1','$2');
UPDATE wp_posts SET post_content = replace(post_content, '$1', '$2');
UPDATE wp_postmeta SET meta_value = replace(meta_value, '$1', '$2');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment