Case: in drupal I had to move a complete site (in single site configuration) from one server to another server (in multisite configuration).
All the files included in files/(single site configuration) were moved to a new directory sites/mydomain.com/files/ (multisite configuration).
At this point the path in the field filepath in the files table of the mysql database was not pointing to the correct place. I had to find and replace all values in filepath field to the new correct directory with the following mysql command:
update [table_name] set [field_name] = replace([field_name],'[string_to_find]','[string_to_replace]');
In my example:
update files set filepath = replace(filepath, "files/fotos","sites/mydomain.com/files");
Post new comment