Posted By

shrop on 07/17/08


Tagged

mysql drupal


Versions (?)

Who likes this?

5 people have marked this snippet as a favorite

tgbdad
basicmagic
Maedi
aleprieto
Stephanie_42


MySQL Find and Replace Drupal filepaths in files table


 / Published in: SQL
 

This is useful if you are changing a Drupal site's file upload path and/or changing from a private to a public file store.

  1. UPDATE files SET filepath = REPLACE(filepath,'path/to/search','path/to/replace');

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: tgbdad on August 16, 2008

Thanks, Shrop. This worked like a charm. When using the audio module, the same query works on the audio_file table, too.

Posted By: tgbdad on August 20, 2008

also works with picture field in users table.

You need to login to post a comment.