Web Hosting Geeks | Web Hosting Experts
Need help? Call us 1(866)TOP-HOST

14655 reviews 1734 hosting providers

Questions & Answers

How to change Image Paths in a Subdirectory in Drupal 7

Apr 10, 2013 by DruNew
I installed Drupal in a  subdirectory and now I want to move it to  another subdirectory. All my images were inserted with the text editor and they all have a path with the old subdirectory name so now if I move the installation the all paths will break. Is there a module or an SQL command that I can use to fix this without having to manually adjust all my image paths? I would appreciate any help in this
Many thanks in advanced

1 Answer

0 votes
Apr 10, 2013 by RalphK
Try this SQL comman
Figured it out - run some sql replacement on the field_data_body table and flush the cache
UPDATE field_data SET body_value = REPLACE(body_value,'src="/yoursource','src="/thenewsource');