Working in Drupal, we often pull databases from different environments for debugging and general development. Every time we did that, we had to update the files locations in /admin/config/media/file-system. It only takes a few seconds to update, but it’s a pain.
Well, no more.
We now put those variables in our settings.php file, and they’re updated automatically.
$conf['file_public_path'] = 'sites/petessite/files'; $conf['file_private_path'] = 'sites/petessite/files/private'; $conf['file_temporary_path'] = 'sites/petessite/files/tmp';
(Yes, I know that file_private_path should be outside the web accessible structure.. but this is for Development, remember?)