I seem to use this more and more and the more i use it, the more i seem to forget the syntax.
If, as I do, you develop under client specific subdomains - e.g. clientname.initsix.co.uk, then when uploading content you will find that filepaths have this hardcoded. When moving to live its best practice (in case you dare to remove the dns entry in the future) to remove these temporary subdomains from the table. (backup first!)
update files set filepath = replace(filepath,'clientname.initsix.co.uk','www.clientname.com');tada! All your files will now becoming from the correct place (remember to move them if you're not using symlinks)

2 Comments
Hi Steve, I've done that
Submitted by Richard Sheppard on
Hi Steve,
I've done that quite a few times, although I'm finding this quite useful nowadays:
http://drupal.org/project/sitedir_migrate
Have you tried it?
Hope all is well.
Cheers,
Ricard
heys No i hadn't seen that
Submitted by sysadmin on
heys
No i hadn't seen that before. Been writing custom stuff. Good catch
Add new comment