Common causes
- The hosting account has reached its disk quota
- The partition holding /tmp or upload_tmp_dir is full
- The temp directory is not writable by the PHP user
- Large local backups or cache folders filling the account
- wp-content/uploads ownership changed after a migration (shows the 'could not be moved' variant)
How to fix it
- Check disk usage. In cPanel open Disk Usage; in hPanel check Hosting > Resources. On a VPS run df -h and look at both / and /tmp.
- Free up space. Remove old backup archives (e.g. wp-content/updraft, wp-content/ai1wm-backups), cache folders and unused themes. Move backups to off-site storage.
- Set a writable temp directory. Point upload_tmp_dir to a folder in your home directory (outside public_html) that your account owns, and set WP_TEMP_DIR to the same path.
- Check uploads permissions. wp-content/uploads and its year/month subfolders should be 755 and owned by the PHP user. Avoid 777.
- Retry with a smaller file. If small files work and large ones fail, the temp partition is nearly full or size-limited. Ask your host to check it.
SSH diagnostics
df -h /tmp ~
du -sh ~/public_html/wp-content/* | sort -h | tail
php -i | grep -E 'upload_tmp_dir|sys_temp_dir'
ls -ld ~/public_html/wp-content/uploads How to stop it happening again
- Store backups off-site instead of inside wp-content
- Set up disk usage alerts in your hosting panel
- Optimize images before upload to slow storage growth