/ Published in: SQL

This is a simple SQL statement which will update all the posts within a Wordpress installation changing the domain which files were uploaded to.
Very handy if migrating a site from a test to live environment and all embedded images are referenced using the test url.
Very handy if migrating a site from a test to live environment and all embedded images are referenced using the test url.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
UPDATE wp_posts SET post_content = REPLACE(post_content, 'http://www.TESTDOMAIN.com', 'http://www.LIVEDOMAIN.com')
Comments
