Search and replace text across all posts

I had used the ZD Video Plugin for WP a long time, and now, since my move to WP 3.0.2, it doesn’t work anymore. To embed a YouTube video using the plugin, I would just write

[zdvideo]url-of-youtube-video[/zdvideo]

Now I need to go back to plain YouTube embedding. How do I write a MySQL query that searches for [zdvideo]*[zdvideo] and replaces it with *?

4 Answers
4

What about these two queries?

UPDATE wp_posts SET post_content = REPLACE(post_content, '[zdvideo]', '');
UPDATE wp_posts SET post_content = REPLACE(post_content, '[/zdvideo]', '');

Leave a Comment