Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Broken Image links after migrating a Drupal site from Local Machine to Live Server

Tags:

drupal-6

Whats the simplest way to update the paths of the images after migrating the website from local machine to a live server. Most of the times I end up updating the paths manually. I m convinced that there must be a simpler way which i m missing out on.

Kindly suggest.

like image 787
Sbhambry Avatar asked Feb 01 '26 10:02

Sbhambry


1 Answers

My guess is that the issue you're seeing is a result of not setting the filepath in the administration. If you go into the administration (admin/settings/file-system) and simply save the page, you'll define the value for the filepath (which should remove the issues).

You could also set all files to use the original default (or local) directory as well via that interface.

The issue, in case you're wondering, is that the variable_get call under the hood for the filepath is dynamic based on the sites directory that you're loading the settings.php file from. Once the value is set, it no longer resorts to the default setting and uses your value instead.

If you're physically moving the files from the relative location they're at locally vs on the server, then I'm not sure there's much of a great way around that issue.

like image 175
William OConnor - csevb10 Avatar answered Feb 03 '26 09:02

William OConnor - csevb10



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!