Non-Standard Files Locations

Learn how to address non-standard file locations from within the Pantheon filesystem.


Standard File Path

Pantheon provides one location for files that are part of your sites content, like those that are managed through Drupal upload forms, e.g. user profile pictures: /sites/default/files. For Drupal sites, this is the only location you can use for files that are uploaded as part of your application. For WordPress sites, /wp-content/uploads is the only acceptable location for files. All other locations are considered part of your codebase, and under version control.

Manage Non-Standard File Paths

Move Files

If you are importing a site that has files in another location, manually move the files into the standard location (/sites/default/files for Drupal and wp-content/uploads for WordPress).

If your site relies on code that expects to find files at non-standard locations (e.g., /content/), create a symlink to the standard location as a workaround:

If you haven't done so already, clone your Pantheon site repository, then navigate to the project's root directory and execute the following commands:

ln -s ./wp-content/uploads ./content
git add content
git commit files -m "adding legacy files location symlink"
git push origin master

If you haven't done so already, clone your Pantheon site repository, then navigate to the project's root directory and execute the following commands:

ln -s ./sites/default/files ./content
git add content
git commit files -m "adding legacy files location symlink"
git push origin master

Symlinks are committed to version control and part of the codebase. Your legacy file paths should now work as expected. As long as the path you've chosen for your symlink does not conflict with a future core update to your application, this link will persist indefinitely. Consider opening an issue on the plugin or module's project page citing non-standard file paths when observed.