Content is king, and images are the crown jewels. But what happens when you try to upload a featured image and WordPress rejects it?
“Upload: Failed to write file to disk.”
This error is paralyzing. If you can’t upload media, you can’t blog. You can’t update plugins. You are stuck. Unlike a generic “HTTP Error,” this message tells us exactly what is wrong: WordPress does not have the keys to open the door.

Your web server has strict security rules about who can “write” (save) data to the hard drive. If those rules get messed up—or if the hard drive is full—WordPress gets locked out. In this guide, we will fix the three causes: permissions, quotas, and temp folders.
Solution 1: Reset Folder Permissions (The 755 Rule)
This is the most common fix. Your uploads folder should be open to WordPress but closed to hackers.
- Open FileZilla (FTP) or cPanel File Manager.
- Navigate to the wp-content folder.
- Right-click the uploads folder.
- Select File Permissions (or “Change Mode”).
- For folders: set the numeric value to 755, check “Recurse into subdirectories,” and select “Apply to directories only.” Click OK.
- For files: right-click uploads again, set the numeric value to 644, check “Recurse into subdirectories,” and select “Apply to files only.” Click OK.
Why this works: 755 means the Owner (you) can write, but the public can only read. 644 ensures files are readable by the browser but cannot be executed as scripts (preventing hacks).

- ✅ Security: Best practice for server safety.
- ❌ Time: Can take a few minutes if you have 10,000 images.
Solution 2: Check Your Disk Quota
Sometimes, “Failed to Write” literally means “no paper left in the notebook.”
The Diagnosis:
- Log in to your cPanel.
- Look at the sidebar widget labeled “Disk Usage” or “Storage.”
- If the bar is red (e.g., 4.9GB / 5.0GB), you are full.
The Fix: Empty the trash — in WordPress, deleted posts and comments sit in the trash for 30 days, so delete them permanently to free up space. Also remove old backups: check your /wp-content/updraft folder, since old backups can take up gigabytes of space. Download them to your computer and delete them from the server.
Solution 3: The Temporary Folder Fix
When you upload a file, WordPress briefly stores it in a temporary folder (/tmp) before moving it to your uploads folder. If the server configuration is broken, this folder might be missing.
The Fix:
- Connect via FTP.
- Go to wp-content and create a new folder named temp.
- Edit your wp-config.php file.
- Add this code:
define('WP_TEMP_DIR', dirname(__FILE__) . '/wp-content/temp/');
Save. This forces WordPress to use your new folder instead of the server’s broken one.
Frequently Asked Questions
Can I use 777 permissions to fix this?
Never. 777 means “anyone in the world can delete or edit my files.” It is the digital equivalent of leaving your front door wide open. Stick to 755.
I am on a VPS, why is this happening?
On a VPS, you might have an “ownership” issue. You may need to run a command like chown -R www-data:www-data /var/www/html via SSH to ensure the web server owns the folder.
Conclusion
The “Failed to Write” error is a gatekeeper. By resetting permissions to 755 and ensuring you have disk space, you hand the keys back to WordPress so it can get back to blogging.

