- Plesk for Linux
Unable to upload a file in Wordpress > example.com > Log in > Media > Add New with the following error
CONFIG_TEXT: Missing temporary directory
CONFIG_TEXT: Missing a temporary folder
There are the following records in
CONFIG_TEXT: AH01071: Got error 'PHP message: PHP Warning: File upload error - unable to create a temporary file in Unknown on line 0\n', referer: https://example.com/wp-admin/upload.php
/tmpfolder has been cleaned up recently with
rm -rf /tmp/*.
By default PHP-FPM service has PrivateTmp enabled:
# systemctl cat plesk-php72-fpm.service | grep PrivateTmp
Note: the PHP version can be identified in Domains > example.com > PHP Settings.
PrivateTmp=truemeans that uploaded files uses the following folder:
/tmp folder resulted in the fact that
/tmp for the PHP-FPM does not exist.
Connect to the server via SSH
Restart the PHP service used by the domain which can be identified in Domains > example.com > PHP Settings. This will recreate the temporary folder:
# service plesk-phpXX-fpm restart