Skip to content

Instantly share code, notes, and snippets.

@adhipg
Created March 10, 2011 06:57
Show Gist options
  • Save adhipg/863677 to your computer and use it in GitHub Desktop.
Save adhipg/863677 to your computer and use it in GitHub Desktop.
SQL to update the posts table when we migrate websites from one site to another. Corrects the URLs of the attachments
UPDATE wp_posts SET post_content = REPLACE (post_content, 'oldlink', 'newlink');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment