Fix "Unable to create directory"
WordPress cannot write to the uploads folder. How to correct file permissions, check the upload path, and rule out a full disk.
"Unable to create directory" appears when uploading media, updating a plugin or theme, or installing WordPress. WordPress cannot write where it needs to. Applies to all shared and reseller hosting.
There are three causes. Work through them in this order — permissions is the usual one, but a full disk produces the same message and no amount of permission-fixing will help.
1. Check disk space
If the account is at its disk quota, nothing can be written anywhere. Check Disk Usage in cPanel before changing anything else. See Monitor disk usage with cPanel.
2. Correct file permissions
Use cPanel's File Manager or an FTP client.
- Go to
/wp-content/. - Select the
/uploads/directory and open File Permissions (Change Permissions in File Manager). - Set directories to 755.
- Tick Recurse into subdirectories and apply to directories only.
- Repeat for files, setting them to 644, applied to files only.
Directories and files need different values, which is why this is two passes.
755 on a directory means the owner can write and others can list it; 644 on
a file means the owner can write and others can read it.
Never set anything to 777. It permits any process on the server to write to
your files, and it is the permission malware looks for. It is also not a fix —
if 755 does not work, ownership is wrong, and that needs support rather than
a looser permission.
3. Check the upload path
A wrong path in WordPress makes it try to write somewhere that does not exist.
- In WordPress, go to Settings → Media.
- Under Uploading Files, check Store uploads in this folder.
- It should be
wp-content/uploads, or empty. If it holds an absolute path from another server — something beginning/home/olduser/— that is the problem. - Correct it and Save Changes.
This is common after a migration. If the field is not shown, the value is set in
wp-config.php as UPLOADS and must be corrected there instead.
Verify
Upload a small image through Media → Add New. If it succeeds, retry whatever failed originally.
If it still fails
The files are probably owned by the wrong user, which happens when files are extracted or restored as a different account. Ownership cannot be changed from cPanel — contact support with the affected path.
Related
LiteSpeed Cache or WP Rocket
Why LSCache is the better fit on WebGee's LiteSpeed servers, what WP Rocket still does well, and why you must not run both.
Install and enable LiteSpeed Cache
Turn on LSCache from cPanel or from WordPress, and understand what each section of the plugin does before you change anything.