In one of my private blogs, I use the excellent IImage Gallery plugin to show photographs. After the upgrade to WordPress 2.5, all of the posts with galleries started failing by showing the message “There is no gallery in this post”. After puzzling about it for a while, I realized that this plugin uses the same
[gallery] tag used by the new built-in gallery feature in WP 2.5, which is causing a conflict. Fortunately, IImage Gallery also allows using
<gallery>, with angle brackets, which is not intercepted by WP. To change all the posts to use the alternate tag without having to edit each post by hand, I used the following command from the MySQL command line:
update blog_posts set post_content=replace(replace(post_content, '[gallery]', '<gallery>'), '[/gallery]', '</gallery>') where post_content like '%[gallery]%';
After this, all the posts worked correctly again!