petrivilen
Member
Posted 15 years ago #
Hello everyone,
I've been working on a WPMU project and we're replacing our old site with the new one. This involves also switching the main domain from kyweb.org to kyweb.fi. The URL is in quite a lot of places - three or four times in blog options and guids. Do you have any suggestions how to manage with the transfer?
Search and replace on the db? :)
I am about to do the same, a change from .net to .com. Can we just go to the Admin>Edit for the main blog and make the changes in the home and file upload area? Will this be enough to make the change or do we really have to get into the database and make changes?
You really have to go into the database. If you just edit the main blog fields under admin, it will change only for that blog, not all of them.
Having done this, I can tell you it's just easier, faster and more accurate to do it right in the db itself.
Hi andrea, is there any way to do that globally? The only syntax i know about is:
update [table_name] set [field_name] = replace([field_name],'[string_to_find]','[string_to_replace]');
Its quite some tables. Or is it better to search & replace within the SQL-Dumpfile?
"Or is it better to search & replace within the SQL-Dumpfile? "
yes.
Thanx andrea, worked fine.
sed -i 's/domain1/domain2/g' dumpfile
is your friend.