Why not just export out the database, run a search and replace using a text editor like Ultraedit, and reimport it?
I suppose that may be what I’ll have to do. I’ve never opened up a SQL db before, and I was a little leery of doing so and then reintegrating it to WordPress.
I was hoping there was already some kind of WP-side interface for something like this, but I guess I have to jump and make it happen.
Thanks.
There is a Search and Replace Plugin, which does direct database updates.
I’ve used it a couple of times, and it does what it says it will. As with anything that can make major changes, make sure you have a backup of your database first.
I have the same issue and S and R pluging does not do it for me. For one thing it is all in German. I tried just doing a search without replace and didn’t get any hits.
I am moving my images to a Gallery 2 system and need to change the photo links in the posts.
Any other suggestions?
This SQL update query will work, assuming your table is called “wp_posts”, the old string is “http://mysite.com/blah” and the new string is “/bleh”:
update wp_posts set post_content = replace(post_content, 'http://mysite.com/blah', '/bleh');
You will need the MySQL client tool or something like phpmyadmin.