My 5.x site was just moved from one domain to another. All of the taxonomy is good, but there are a lot of links to the old URL within the content of many of the posts (989 nodes).

Just in case I'm not being clear enough (I'm not really sure how to word it), here's an example:

Old URL: (now a dead link)
New URL:

Within the story "" I have a picture, "".

At the new URL, the story's content transferred perfectly in the database, but the picture will not show because the link in the content of the story is still "".

Is there anyway to auto convert all of those links to other posts, pictures and uploaded files in the content of the nodes to the new URL without going through all 989 nodes and changing them manually?


If you know how to run queries on your database manually, you can simply run a search-and-replace query like this (source:

update [table_name] set [field_name] = replace([field_name],'[string_to_find]','[string_to_replace]');

Do this on the `node_revisions` table for both the `teaser` and `body` columns. If you have any CCK fields that can hold similar data, do a search and replace on them as well.
Of course, backup first and test thoroughly.

That's part of the problem and something that I should have mentioned in my earlier post, I do not have access to the database.

Thank you for the suggestion, though. I will ask the person who has database access if they can try this for me.

If you don't have direct access to the database, you can also write a couple of lines of php for this and run it in the 'execute php' block of the Devel module. It's a little trickier though, I can't really recommend that method. Also, creating a backup is also much easier when you have something like phpmyadmin. By the way, do you have ftp access to the server? In that case you can also install phpmyadmin yourself.