Home WordPress How to Fix the Missing a Temporary Folder Error in WordPress

How to Fix the Missing a Temporary Folder Error in WordPress

One of the error types that might happen to your WordPress site missing a temporary folder. When this error is happening, you won’t be able to upload new media, update a plugin or theme, and the WordPress core. The cause of this error is that WordPress is unable to find the temporary folder, which is used by WordPress to temporarily store the file you upload. This type of error usually happens after you migrate your WordPress site from a new server to another one and a temporary folder is missed from the file copying process.

To fix the issue, you need to edit the wp-config.php file and define the location of the temporary folder on your WordPress. You can add the following code to the wp-config.php file.

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

You can place the code above right beneath the line /* That's all, stop editing! Happy publishing. */ as shown in the example below.

Don’t forget to save the change. Once done editing the wp-config.php file, create a new folder under the wp-content folder and name it temp.

If the error still happens, try to create a temporary folder (name it tmp) under the home folder of your website (outside the public_html folder).

If still not fixed, make sure to check the file permission — as well as the ownership — of the temporary folder you have just created.


Please enter your comment!
Please enter your name here