If you’ve ever tried uploading a file to your WordPress Media Library and seen the dreaded “Upload Failed to Write File to Disk” error, you’re not alone. This is one of the more common WordPress errors – but the good news is, it’s fixable.
In this guide, we’ll cover the most common causes and give you step-by-step instructions to resolve the issue. You don’t need to be a developer to fix it, and in most cases, the solution is straightforward.
📚 Table of Contents
- Why This Error Happens
- Method 1: Change File Permissions
- Method 2: Increase PHP Memory Limit
- Method 3: Check Available Disk Space
- Method 4: Rename the Uploads Directory
- Bonus Method: Contact Your Hosting Provider
- FAQ: Upload Issues in WordPress
- Sources
❓ Why This Error Happens
The “Upload Failed to Write File to Disk” error typically occurs due to one or more of the following reasons:
- Incorrect File Permissions – Your WordPress installation or web server may not have the proper write permissions for the wp-content/uploads directory. Without the correct permissions, WordPress cannot save uploaded files.
- Full Disk Quota — If your hosting account has used up all allocated disk space, uploads will fail as there is no room left on the server.
- Corrupted Uploads Directory – The directory where WordPress stores uploads might be missing, corrupted, or misconfigured.
- PHP Temporary Directory Issues – PHP uses a temporary folder to hold files during upload. If this folder is full, missing, or inaccessible, uploads can fail.
Understanding these root causes helps in choosing the correct fix, which we’ll explore next.
✅ Method 1: Change File Permissions
Incorrect file permissions are the leading cause of this error. WordPress needs to be able to write to the uploads folder and its subdirectories.
Follow these steps to fix file permissions:
- Log into your site via FTP or SFTP
- Navigate to wp-content and right-click the uploads folder
- Choose File Permissions
- Set the numeric value to 755
- Check Recurse into subdirectories
- Choose Apply to directories only
- Click OK
This ensures that all upload directories have the proper permissions for writing files. Afterward, try uploading a file again to see if the problem is fixed.
Learn more about securing your WordPress installation in our server hardening guide.
✅ Method 2: Increase PHP Memory Limit
Though less common, a low PHP memory limit can cause upload errors, especially on sites with many plugins or large media files.
To increase PHP memory:
- Create a file named
php.ini
- Add this line:
memory_limit = 256M
- Upload it to the
/wp-admin/
folder on your server
If you don’t have access to create php.ini, contact your hosting provider to increase the PHP memory limit.
✅ Method 3: Check Available Disk Space
Running out of server storage space is a very common reason for upload failures.
Check your disk space as follows:
- Log into your hosting control panel (such as cPanel, Plesk, or a custom dashboard)
- Find the Disk Usage or Storage section
- Verify your used and available disk space
If your storage is full, delete unnecessary files or upgrade your hosting plan.
Pressillion users can monitor disk space directly from their dashboard.
✅ Method 4: Rename the Uploads Directory
If the uploads directory is corrupted, renaming it forces WordPress to create a fresh directory.
Steps:
- Connect to your site via FTP
- Navigate to
wp-content/uploads
- Rename the uploads folder to something like
uploads_old
- Log into your WordPress dashboard
- Go to Settings → Media
- Change the Uploading Files path to match your new folder name (e.g.,
uploads_old
) - Try uploading again
If this works, your original uploads folder was likely corrupted. Don’t forget to check that the new folder has permissions set to 755.
✅ Method 5: Check PHP Temporary Upload Directory
PHP temporarily stores files during upload in a temp directory specified by the upload_tmp_dir
directive in php.ini
.
If this directory is missing, full, or not writable, you might get the upload failed error.
To check and fix:
Create a PHP info file to view your PHP settings:
<?php phpinfo(); ?>
Upload and visit it in your browser to check the temporary directory.
🚑 Bonus Method: Contact Your Hosting Provider
If the above steps don’t solve it, your server’s temporary files directory (/tmp
) may be full. This isn’t accessible via WordPress.
Contact your host and ask them to:
- Empty the temp directory
- Verify PHP has write permissions to the uploads folder
At Pressillion, we’ll fix this for you instantly — just open a support ticket.
🤔 FAQ: Upload Issues in WordPress
Can plugins cause upload errors? Yes. Security or file management plugins might interfere with file uploads or permissions. Temporarily disable plugins to test.
What permissions should folders and files have? Directories usually need 755 permissions, and files need 644. Avoid setting permissions to 777 permanently.
How do I prevent this error in the future? Monitor your disk space regularly, use trusted plugins, and host your site on reliable infrastructure like Pressillion.
What if the uploads folder is completely missing? You can manually create the folder at wp-content/uploads
via FTP and set permissions to 755.
Why does PHP’s temporary directory matter? PHP uses it to temporarily store files during upload. If it’s misconfigured or inaccessible, uploads will fail.
🔗 Sources
Need help? Explore Pressillion’s managed WordPress hosting — we proactively monitor permissions and storage so you don’t have to.
Related Reading
- How to Fix Error 521 in WordPress and Cloudflare
- How to Fix Uploaded File Exceeds Upload Max Error
- How to Fix “This file is not implemented” Error
- How to Fix admin-ajax.php Error