You drag an image into the Media LibraryA repository within WordPress where all uploaded images, vid... More. The upload bar fills. Then it stops. A red error appears:
“Unable to create directory. Is its parent directory writable by the server?”
Your media uploads are broken. New images, PDFs, and files won’t go through. Old media still works — but nothing new.
This error is frustrating, but it has a small set of known causes. This guide walks you through exactly how to fix it.
WordPress organizes uploads by year and month. When you upload a file, it tries to create a folder like:
/wp-content/uploads/2024/03/
The error “Unable to create directory” means WordPress cannot create that month’s folder.
What WordPress is trying to do:
/wp-content/uploads/ exists/wp-content/uploads/2024/ exists/wp-content/uploads/2024/03/ existsThe server says: “I don’t have permission to create that folder.”
| Cause | Likelihood | Quick Test |
|---|---|---|
| Wrong folder permissions | HIGH | Upload folder is not writable |
| Wrong folder ownership | MEDIUM | File owner ≠ web server user |
| Disk space full | MEDIUM | Host says storage is maxed |
| Missing uploads folder | LOW | /uploads/ doesn’t exist at all |
| PHP directory creation disabled | VERY LOW | Rare hosting restriction |
Follow these in order. Test after each step.
WordPress needs the /wp-content/uploads/ folder to have the right permissions.
Correct permissions:
755644How to check via FTP (FileZilla, etc.):
/wp-content/uploads folder → File Permissions755Then fix file permissions inside:
uploads folder again → File Permissions644Via hosting File Manager (cPanel, etc.):
public_html/wp-content/uploads → Change Permissions755 for folders, 644 for files (most file managers have a recursive option)Why 755? The web server needs write access to create new folders. 755 gives the owner (server) full control, and others read/execute access.
Permissions can be correct, but if the wrong user owns the files, the web server still can’t write.
How to check (if you have SSH access):
bash
ls -la /path/to/wp-content/
Look for the owner and group of the uploads folder. It should match the user running the web server (often www-data, nobody, or your hosting username).
How to fix (SSH):
bash
cd /path/to/wp-content/ chown -R www-data:www-data uploads/
(Replace www-data:www-data with your server’s correct user:group.)
No SSH access? Contact your hosting support. Ask them:
“My WordPress uploads folder is not writable. Can you check the ownership of
/wp-content/uploads/and ensure the web server user owns it?”
If your hosting account is out of space, WordPress cannot create new directories or files.
How to check:
How to free up space:
Quick SQL to count revisions (for reference):
sql
SELECT COUNT(*) FROM wp_posts WHERE post_type = 'revision';
Sometimes the /uploads/ folder doesn’t exist at all (after migration or fresh install).
How to fix via FTP:
/wp-content/uploads755uploads, create the current year folder (e.g., 2024)75506 for June)755Or let WordPress try again:
Simply create the empty uploads folder with 755 permissions. WordPress will create year/month subfolders automatically on the next upload.
If you’ve tried everything and still can’t fix permissions, you can tell WordPress to stop organizing uploads into year/month folders.
Add this to wp-config.php (before the “stop editing” line):
php
define('UPLOADS', 'wp-content/uploads');
add_filter('upload_dir', function($uploads) {
$uploads['subdir'] = '';
$uploads['path'] = $uploads['basedir'];
$uploads['url'] = $uploads['baseurl'];
return $uploads;
});
Warning: This is a workaround, not a proper fix. All new uploads will go directly into /uploads/, which can become messy. Use only if your host refuses to fix permissions properly.
Some managed hosts have unique behaviors.
Kinsta:
WP Engine:
Cloudways:
Local development (XAMPP/MAMP/Local by Flywheel):
Set correct permissions at install
When you first install WordPress, ensure /wp-content/uploads/ is created with 755 permissions. Many hosts do this automatically.
Monitor disk space
Set up alerts for when you reach 80%, 90%, and 95% of your storage limit. Most managed hosts offer this.
Don’t manually move or rename uploads via FTP
Moving folders via FTP can reset ownership and permissions. Use the WordPress Media LibraryA repository within WordPress where all uploaded images, vid... More for management instead.
Use a backupA copy of your WordPress site's files and database, saved to... More pluginSoftware that adds specific features or functionality to a W... More that stores off-server
If you use a backupA copy of your WordPress site's files and database, saved to... More pluginSoftware that adds specific features or functionality to a W... More (UpdraftPlus, etc.), store backups in cloud storage (Google Drive, Dropbox, S3), not on the same server.
Regular cleanup schedule
Once a month:
The “Unable to create directory” error has a simple cause: the web server can’t create a folder. The solution is almost always fixing permissions or freeing up disk space.
Remember:
/uploads/ should be 755This error is annoying, but it’s almost never a WordPress bug. It’s a server configuration issue — and that means it’s fixable.