Search and replace in SQL
Posted: Fri Oct 25, 2013 9:10 am
I think I done something pretty stupid a long time ago with my CMS install - I decided I would speed things up by moving all (most) of the media (images, JS, Flash etc) to another server, and reference it from there, sort of like a CDN.
Anyway, now I have decided to revert those changes, and I have modified the main templates, stylesheets etc, but I have made a lot of references to this URL throughout the content of the site.
Now I am wondering, is it possible for me to export the database, search and replace this URL (I have now put the files in the root of the install, so I can just remove the root URL of the other server and it will leave a local path to the files - /files/images/etc) and then re import?
Anyway, now I have decided to revert those changes, and I have modified the main templates, stylesheets etc, but I have made a lot of references to this URL throughout the content of the site.
Now I am wondering, is it possible for me to export the database, search and replace this URL (I have now put the files in the root of the install, so I can just remove the root URL of the other server and it will leave a local path to the files - /files/images/etc) and then re import?