Skip to content
WordPress3 min read

WordPress "Missing a temporary folder" error

Missing a temporary folder.

Short answer

The message means PHP couldn't create the temporary file that holds an upload before handing it to WordPress. The usual causes are a full disk or inode quota, or an upload_tmp_dir setting that points to a folder that doesn't exist. Free up space first, then check the PHP settings.

ArabyHost teamLast updated: ShareWhatsAppXLinkedIn
Contents
  1. What the error means
  2. Common causes
  3. How to fix it
  4. Prevention
  5. On ArabyHost

You’ll see it in the Media Library or when uploading a plugin or theme ZIP, often right after a site was moved to a new server. The file never reaches WordPress at all, because the failure happens in a step PHP handles first.

What the error means

When you upload a file, PHP first writes it to a temporary folder (the upload_tmp_dir setting, or the system temp folder if that’s empty), then hands it to WordPress, which moves it into wp-content/uploads. If PHP can’t create that temporary file, it returns the error code UPLOAD_ERR_NO_TMP_DIR, which WordPress displays as Missing a temporary folder.

Common causes

  • The account’s disk space or inode limit is full, so no new file can be created, not even a temporary one. This is the most common cause on shared hosting.
  • upload_tmp_dir points to a folder that doesn’t exist or isn’t writable, such as a path from the old server after a migration.
  • An open_basedir restriction that doesn’t include the temp folder; see open_basedir explained.
  • A problem with the system temp folder on the server itself, which the hosting provider has to fix.

How to fix it

  1. Check space and file count: in cPanel open Files › Disk Usage and look at Disk Usage and File Usage in the sidebar. If either is at the limit, follow the fix for disk quota exceeded or inode limit reached.
  2. Free up space: delete old backup archives stored inside the site (backup plugins keep them under wp-content), large error_log files and old mail, and purge your cache plugin.
  3. See the temp folder value: in Files › File Manager, create info-check.php in the site root:
<?php phpinfo();

Open https://example.com/info-check.php and search for upload_tmp_dir and open_basedir. Delete the file straight after, since it exposes server details. 4. Review custom settings: if you copied a php.ini or .user.ini from an old server into public_html, look for upload_tmp_dir or open_basedir lines with old paths and remove them. Check Software › MultiPHP INI Editor too. More on php.ini. 5. If it happens while updating plugins rather than uploading media, give WordPress its own temp folder in wp-config.php, above That's all, stop editing!:

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

Then create the wp-content/temp folder with permission 755. This also fixes Destination directory for file streaming does not exist or is not writable. 6. If space is fine and the value is wrong, contact support with the upload_tmp_dir value you found: it’s a server-level setting you can’t change from site files.

Prevention

  • Don’t keep backup archives inside the hosting account for long.
  • Rotate or delete large error_log files regularly.
  • After any migration, check php.ini, .user.ini and .htaccess for paths from the old server.

On ArabyHost

Each account is isolated in CloudLinux CageFS with its own resource limits, so the check starts with your account’s space and file count, both shown in cPanel, one click from the Araby Panel. If space is fine, ask the Araby AI assistant to read the error log, or contact support with the upload_tmp_dir value. See our WordPress hosting.

FAQ

Does WP_TEMP_DIR fix image uploads?

Usually not. PHP stores the uploaded file before WordPress even runs, while WP_TEMP_DIR changes the folder WordPress itself uses when downloading updates and plugins. It helps when the problem appears during updates.

Why did this suddenly start on a site that worked?

Most likely the account hit its disk or inode limit because of stored backups, cache files or large logs. Check Disk Usage in cPanel before anything else.

Can I change upload_tmp_dir in .user.ini?

No. upload_tmp_dir is a server-level PHP setting and can't be changed from .user.ini or .htaccess. If its value is wrong, ask support to correct it.

Useful? Share it with someone who needs it:WhatsAppXLinkedIn

Read next

Ready to put your idea online?

Fast, isolated hosting, support that understands you, and an AI assistant that fixes problems with you.