WordPress reports “Missing a temporary folder.” when uploading images


With CloudLinux’s CageFS in use, a website may report that images cannot be uploaded. The following error will appear within the WordPress Dashboard:

“file.png” has failed to upload.
Missing a temporary folder


The most common issue that we have found is that CageFS requires an update such that a temporary folder could be found for uploads.


If you do find that the issue is not within CloudLinux, then adding these line within the website’s wp-config.php file may assist with your issue:

define('WP_TEMP_DIR', dirname(__FILE__) . '/wp-content/temp/');

If the website does have CageFS enabled, then we recommend either running a force update with the following command:

cagefsctl --force-update

Or, you could disable and then enable it with:

cagefsctl --disable $USER
cagefsctl --enable $USER

Where $USER is the username of the account.

You may also like...