WordPress GuideErrors → Failed To Write File Disk

Fixed: WordPress failed to write file to disk

Two workers in a warehouse compare dedicated server options on a tablet

Nothing kills your momentum like uploading a file in WordPress and hitting a vague, frustrating error: “Failed to write file to disk.” You’re just trying to upload an image or update a plugin—why is this happening?

Let’s walk through what causes the error, how to fix it step-by-step, and how to make sure it doesn’t happen again.

WordPress failed to write file to disk: what it means

This error pops up when WordPress doesn’t have permission to store files on your web server. It often appears during image uploads, plugin installations, or theme updates.

You might also see related messages like:

In most cases, the problem isn’t WordPress. It’s a server or configuration issue that’s blocking WordPress from writing files to disk.

What causes this error in WordPress?

There are several reasons why WordPress might not be able to save files on your server:

How to fix “failed to write file to disk” in WordPress

Start with file permissions and work through the list. Most users can fix the issue without touching advanced server settings.

1. Check and reset file and folder permissions

WordPress files and folders need the correct permissions so your web server can write to them.

What permissions should be:

How to check and fix this using cPanel File Manager:

Using FTP (e.g. FileZilla):

Avoid 777 permissions. It might fix the error temporarily, but it opens your site to serious security risks.

2. Update file and folder ownership (advanced users)

If your files are owned by a different user than the one PHP runs under, WordPress might not be allowed to write to them, even with the right permissions.

This usually happens when:

How to check and fix via SSH:

This step requires root access—if you’re on shared hosting, you’ll need to contact your host.

3. Clear or recreate the PHP temporary folder

Before WordPress stores an uploaded file in wp-content/uploads/, PHP places it in a temporary folder. If this folder is missing, full, or not writable, uploads will fail.

How to find your temp directory:

To fix:

If you don’t have access to php.ini, ask your hosting provider to set the upload_tmp_dir for you.

4. Check disk space and hosting quotas

Even with perfect permissions, uploads will fail if your server is out of space or file quota.

On shared hosting:

On VPS or dedicated servers:

To check inode usage:

df -i

Fixes:

5. Disable plugins or security software temporarily

Sometimes, a plugin might block uploads by modifying permissions or interfering with file operations.

How to test:

Also check:

Once you find the problematic plugin, contact the developer or find an alternative.

6. Contact your hosting provider

If you’re not comfortable changing permissions, editing config files, or checking server storage, your hosting provider can help.

Include these details when submitting a ticket:

Many hosts can fix the issue in just a few minutes.

How to prevent this error in the future

Once you fix the issue, take a few steps to prevent it from happening again.

Monitor disk space and quotas

Use your hosting dashboard, watch for:

Set up alerts if your host offers them.

Use managed WordPress hosting

Most permission and config issues are less common with fully managed WordPress hosting. Managed hosts configure servers specifically for WordPress and fix these issues for you if they do happen.

Backup your site before making changes

Before editing permissions, ownership, or server settings, make a full backup of your site files and database. Plugins like UpdraftPlus or BackupBuddy can help.

Additional resources

Diagnosing WordPress errors on your site →

Even more common errors, how to troubleshoot them, and how to solve them

How to fix the HTTP error when uploading images to WordPress →

Find out how to fix the WordPress HTTP error when uploading images and get your media library working smoothly again.

What is managed WordPress hosting? →

What it means, what it includes, and how to decide if it’s right for you

Image

Haritha Jacob is a knowledgeable System Engineer with extensive experience in resolving costumers’ complaints and issues. She has experience with various programming languages and operating systems, enterprise backup and recovery procedures, system performance-monitoring tools, and more.