Uploads Failing - Missing Temporary Folder
Your server's temporary upload folder isn't configured correctly, which prevents images or plugins from uploading.
Why this happens
PHP needs a working temporary directory to handle file uploads (including images and plugin installs) before moving them to their final location. If that temp directory isn't configured correctly on your server, or WordPress can't detect it automatically, uploads fail with this specific error even though nothing else appears to be wrong.
Step-by-step fix
- Add this line to wp-config.php: define('WP_TEMP_DIR', ABSPATH . 'wp-content/temp/');
- Create a new folder named 'temp' inside the wp-content folder.
- Give that folder proper permissions (755, or mark it writable via File Manager).
- If the issue continues, ask your hosting provider to check the PHP upload_tmp_dir setting.
How to prevent it happening again
- If you manage your own server, verify PHP's upload_tmp_dir setting is set and writable.
- Avoid changing hosting-level PHP settings unless you understand what upload_tmp_dir controls.
- Keep the WP_TEMP_DIR constant defined in wp-config.php as a reliable fallback on hosts with inconsistent temp folder detection.
😩 Still stuck, or want it fixed without doing it yourself?
I fix WordPress errors like this every day. Send me your error and I'll get your site back up - most fixes are completed within 24 hours.