How to fix the temporary directory missing error in WordPress?

The temporary directory missing error in WordPress prevents you from updating themes and plugins, uploading files and images, and even updating WordPress core. Here we will help you to solve this problem easily. At the end of this article, your WordPress will be back up and running in no time.

What is WordPress temporary directory missing error?

The “Missing temporary directory” error is the result of incorrect PHP configuration on your WordPress hosting environment. One of those settings dictates that WordPress should store uploaded files in a temporary folder before saving them to the desired location. Without access to that temporary folder, WordPress will not be able to process uploads or software updates.

Whether you accidentally deleted the temp folder or not, this error occurs when WordPress is unable to locate or access that folder.

Now that we’ve covered the culprit behind the “Missing temporary directory” error, let’s see how to quickly fix it.

Fix WordPress temporary directory missing error

You can easily fix this WordPress error by modifying your site file.

IMPORTANT! Make sure to back up the file wp-config.php before making any changes to avoid data loss.

  1. Establish a connection to your account using a or the File Manager of your hosting control panel. We will use the hPanel for this tutorial.
  2. Access the file wp-config.php from the root folder of the WordPress installation. In most cases, you can find the file in the directory public_html.
  3. Add the following code snippet before the line “That’s all, stop editing! Happy posting«. define(‘WP_TEMP_DIR’,dirname(_FILE_). ‘/wp-content/temp/’);
  4. Save the changes and re-upload the file wp-config.php updated to your website.
  5. Returning to the File Manager, locate the folder /wp-content and add a new folder named temperature inside of her.
  6. It is done. After logging back into your WordPress site, you should be able to upload images again.
See also  How to install and configure Docker on Ubuntu 18.04

conclusion

We hope this guide helped you fix the WordPress error «Missing temporary directory» on your WordPress website.

If you have anything to ask, feel free to contact us through the comment section below.

Gustavo is passionate about creating websites. He focuses on the application of SEO strategies at for Spain and Latin America, as well as the creation of high-level content. When he is not applying new WordPress tricks you can find him playing the guitar, traveling or taking an online course.

Loading Facebook Comments ...
Loading Disqus Comments ...