Moving a Drupal site to a new host or domain name

If you are moving attached files in your Drupal site to a new domain name, the following SQL query to run on the files table is a lifesaver:

UPDATE `files` SET `filepath` = REPLACE(`filepath`, "sites/", "sites/");

Simply replace '' and '' with your respective values and run the query!

Drupal version: 


Add new comment