The temporary files directory in Drupal is the location on your infrastructure where Drupal core and contributed modules upload files for processing.
Acquia’s require line in your
website’s settings.php
file configures the location of your temporary files
directory to /mnt/tmp/[sitename].[env]
, where [sitename]
is your
application name and [env]
is the environment. This location is available
as an environment variable.
For more information about your application name, see Sitename definition.
For a full list of Cloud Platform file locations, see File locations.
For more information about Twig caches, see Twig caches.
Important
If you are unable to locate the temporary files, you can set a custom directory for storing temporary files. You must create such a directory on the shared file system. Additionally, ensure that the file path you provide to the
file_temp_path
parameter already exists. Otherwise, you may face issues with temporary files.If you use Cloud Classic, do not set the temporary directory to
/tmp
. The size of the/tmp
directory is lesser than the size of the/mnt/tmp/[sitename].[env]
directory. Therefore, it might run out of space in a short time, and might be purged quickly.If you use Cloud Next, the default value of
file_temp_path
parameter is/tmp
.
Modules and the temporary directory
Drupal modules that write to temporary directories may require additional configuration to function properly in environments with multiple infrastructures, such as production environments for Cloud Platform Enterprise and Cloud Platform Site Factory. For more information, see Additional module issues and the following lists of modules:
More information
Drupal: Twig cache in the Acquia Knowledge Base