Monday, 3 August 2009

SQL code to find and replace text in a Wordpress database

Really useful bit of SQL that allows you to find and replace any bit of text within a Wordpress post or page. Very useful for whenn migrating a Wordpress database.

UPDATE `wp_posts` SET post_content = replace(post_content,
'http://www.kineticpulse.co.uk/wordpress25/'
,'http://www.101datasolutions.co.uk/');

0 comments:

Post a Comment