1 filthio Jan 27, 2008 12:04
3 filthio Jan 27, 2008 13:30
Thanks! I'll have a go.
4 yabba Jan 27, 2008 13:45
don't quote me, but I believe you can do something like :
update T_items__item set item_content = replace( 'http://old.domain.com/', 'http://new.domain.com/' ) where 1
¥
*edit*
Correction, it should look like this :
update T_items__item set item_content = (replace( item_content, 'http://old.domain.com/', 'http://new.domain.com/' ) )
5 filthio Jan 28, 2008 19:22
Cheers ¥åßßå - that sounds even better. Uploading a 24Mb database is a pain unless there's a good reason! I assume this is a SQL query?
6 yabba Jan 28, 2008 19:39
it is, if you run it in PhpMyAdmin or similar then change the "T_" to "evo_" or whatever your table prefix is ;)
Ohh yeah, and take a backup of your backup before you run it .... just in case ;)
¥
7 filthio Jan 28, 2008 20:07
Thanks - and yes I will backup. I've already got a nice collection of these backups building up into a pile on my desktop. A few more won't hur...
:)
8 yabba Jan 28, 2008 20:11
9 filthio Jan 28, 2008 23:43
100% success, thanks Yabba and Afwas. That sure beats a manual trawl. Actually, it was post_content, not item_content. But I managed to sort that out myself. Cheers.
10 yabba Jan 29, 2008 00:19
yay, chalk another one up for the wetter side of the pond ;)
¥
You don't have problems here. SQL is plain text, so you can simply do a find/replace. But do test thouroughly before you go online and keep a backup etc.
B2evo uses the $baseurl to be able to use relative paths. If you start using them also a move to a new server becomes even easier than this.
Good luck