Cobra Forum

Plesk Panel => Webserver => Topic started by: mahesh on Dec 12, 2024, 05:40 AM

Title: Unable to upload file to WordPress website hosted on Plesk:
Post by: mahesh on Dec 12, 2024, 05:40 AM
Question
Unable to upload file to WordPress website hosted on Plesk: Missing temporary directory
Symptoms

OR

Missing a temporary folder

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
Cause
PHP /tmp folder has been removed recently with rm -rf /tmp/* command. The temporary folder might also be removed by 3rd party tools, like tmpreaper package.

Removal of PHP temporary folder resulted in inability to upload files on websites that use certain PHP-FPM handler.

ResolutionWarning: If there is a 3rd party tool software deleting the temporary files, such as tmpreaper package, make sure to configure it properly or uninstall it from the system to avoid any conflict with Plesk and other services

1.Log into Plesk

2.Identify the PHP version used by the domain in Domains > example.com > PHP Settings:

(https://pix.cobrasoft.org/images/2024/12/12/mceclip0.png)

3.Restart the corresponding PHP service in Tools & Settings > Services Management by clicking the restart icon. This will recreate the temporary folder:
(https://pix.cobrasoft.org/images/2024/12/12/mceclip1.png)