Fix for the warning about the Drupal 8.8.x deprecated temporary directory configuration
Fix for the warning about the Drupal 8.8.x deprecated temporary directory configuration | Cloud Platform | Acquia Product Documentation
Fix for the warning about the Drupal 8.8.x deprecated temporary directory configuration
Date Published: February 11, 2022
In your Drupal status report, you may see an warning like this for versions 8.8.0 or higher:
TEMPORARY DIRECTORY Deprecated configuration You are using deprecated configuration for the temporary files path. Remove the configuration and add the following to settings.php. $settings["file_temp_path"] = "/mnt/tmp/yoursubscription"
This setting will be enforced in Drupal 9 and above. To resolve it and to avoid having to hard-code the path, use the following code instead:
This will use your site's environment variables to determine the correct directory to use. This is best done inside the IF block that has the require line, and put the above line just after that line.