When WordPress shows “Failed to write file to disk” during a Media Library upload (or while creating an uploads folder), PHP could not save the file on the server. The image or document is often fine. The usual causes are folder permissions or ownership after a migration, an unavailable or full PHP temporary directory, or a host disk quota (or inode) limit.
Work this checklist in order. Prefer staging when you can reproduce the upload there. Take a backup before changing ownership or permissions on production. This article is about filesystem write failures. If the uploader shows an HTTP error, missing thumbnails, or a broken Media Library grid while disk writes succeed, use media upload errors. If a theme or plugin ZIP hits “The link you followed has expired,” use link you followed has expired. If one covered WordPress issue is clearly to blame and you want help, use the $99 one-time fix. We confirm the scope before work begins.
Define what failed
- Confirm the message appears while uploading to Media Library (or when WordPress tries to create a year/month folder under
wp-content/uploads).
- Note the file size and type. Try a tiny JPEG under 100 KB as a control.
- If the failure is only on large theme/plugin ZIP installs with the expired-link screen, use link you followed has expired.
- If the log shows a memory fatal during image processing, see also memory exhausted.
Quick triage map
| What you observe | Likely layer | First useful check |
| Tiny and large uploads both fail with write-to-disk | Permissions, tmp, or quota | Site Health + host disk/inode and uploads folder ownership |
| Started right after a migration or site move | Ownership or permissions may have changed | Ask the host to confirm the PHP account can write to the uploads folder |
| Host panel shows disk or inode limit reached | Quota | Free space or raise plan with the host; then retest a tiny upload |
| HTTP error or missing thumbnails; disk message absent | Media pipeline | Media upload checklist |
| Theme/plugin ZIP: expired-link screen | Install upload limits | Link expired checklist |
Safe diagnostic order
- Control test with a tiny file. Upload a small JPEG. If that fails with the same message, treat it as a server write problem, not a bad image.
- Read Site Health for paths and limits. In Tools → Site Health → Info, note the uploads path, whether the directory is writable, and PHP values such as
upload_tmp_dir when shown. Keep that page for your host ticket.
- Ask the host to check disk space and inodes. Full disks and exhausted inode counts produce write failures even when permissions look fine. Ask for the account quota view and free space under the site’s home and
wp-content.
- Confirm uploads access with the host. Ask your host which account runs PHP for this site and whether it can write to
wp-content/uploads and its year/month folders. Have the host correct ownership or permissions for that setup. Common starting permissions are 755 for directories and 644 for files, but the correct owner and permissions depend on the host. Do not use 777. Retest a tiny upload after the repair.
- Check the effective PHP temporary directory. Ask your host which temporary directory PHP actually uses and whether the PHP account can write there, with free space available. An empty
upload_tmp_dir setting is not itself a fault: PHP normally uses the system temporary directory. Have the host repair the effective path or its access if needed.
- Retest the full media path. Upload a small image, confirm it appears in the Media Library, and open its URL in a private window. Restore any temporary plugin changes. Keep durable ownership or quota fixes that resolved the write error.
Common causes
wp-content/uploads (or a year/month subfolder) not writable by the account running PHP after a migration.
- Host disk quota or inode limit reached.
- The temporary directory PHP actually uses is unavailable, not writable, or full.
- Incorrect recursive permissions applied from a tutorial (including unsafe
777).
- Confusing this message with Media Library HTTP errors or theme/plugin ZIP size limits.
When a $99 one-time fix fits
Request the $99 one-time WordPress fix if you want help on one WordPress site clearing a repeatable “Failed to write file to disk” upload: confirming writable uploads and temp paths, coordinating a host-approved ownership or quota fix, and verifying a small Media Library upload succeeds. Paste the exact message, file type/size, and when it started. We confirm the scope before work begins. Send credentials only through the private access link provided after your request is accepted.
Full server rebuilds, account-wide hosting upgrades, custom storage backends, and Media Library HTTP/thumbnail failures without this write message are outside this offer. Use media upload errors for those paths and memory exhausted when the log shows a memory fatal during processing.
Related checks
If a tiny upload still fails after host-confirmed free space, correct ownership, and a writable temp directory, send your host the exact error text, Site Health uploads path notes, the failing file size, and the start time. Suspected compromise needs a security investigation as well as restoring writable uploads.