The "Unable to create directory" error in WordPress means the web server doesn't have write permission to the uploads directory (or the directory doesn't exist). This prevents WordPress from saving media uploads, plugin files, and other content it needs to write to disk. The fix is usually a simple permission correction in cPanel's File Manager or via SSH.
In cPanel's File Manager, navigate to wp-content/. If the uploads folder exists, right-click it, select "Change Permissions," and set it to 755. Also set the wp-content directory itself to 755. If the uploads folder doesn't exist, create it manually.
01. Why This Happens
WordPress stores uploaded media in wp-content/uploads/ and creates year/month subdirectories automatically (e.g., uploads/2026/03/). For this to work, the web server process needs write permission to both wp-content/ and uploads/.
Common scenarios that cause this error:
Wrong ownership - Files were uploaded via FTP or SSH as a different user than the web server expects. On CloudLinux/cPanel servers, files should be owned by your cPanel username.
Wrong permissions - The directory permissions are set to 700 or 750 instead of 755, preventing the web server from writing.
Missing uploads directory - The wp-content/uploads/ directory was accidentally deleted or never created (common on fresh manual WordPress installs).
Disk quota exceeded - Your hosting account has reached its disk space or inode limit. WordPress can't create new directories or files. See our disk space guide.
02. Fixing Permissions
Via cPanel File Manager
- Open File Manager - In cPanel, click "File Manager"
- Navigate to your WordPress directory - Usually
public_html/ - Right-click
wp-content- Select "Change Permissions" - Set to 755 - Check boxes for Owner: Read/Write/Execute, Group: Read/Execute, World: Read/Execute
- Open
wp-content- Find theuploadsdirectory and set it to 755 as well
Via SSH
# Fix ownership (replace 'username' with your cPanel username)
chown -R username:username ~/public_html/wp-content/uploads/
# Fix permissions - directories to 755, files to 644
find ~/public_html/wp-content/uploads/ -type d -exec chmod 755 {} \;
find ~/public_html/wp-content/uploads/ -type f -exec chmod 644 {} \;
Never set directories to 777. This gives everyone read/write/execute access and is a security risk. On Ultra Web Hosting servers, 755 is the correct permission for directories and 644 for files. Our web server configuration (suEXEC/LSAPI) runs PHP as your cPanel user, so 755 provides the necessary write access.
03. Creating a Missing Directory
If the uploads directory doesn't exist at all:
Via cPanel File Manager
Navigate to wp-content/, click "+ Folder" in the toolbar, name it uploads, and click "Create New Folder." Permissions should default to 755.
Via SSH
mkdir -p ~/public_html/wp-content/uploads
chmod 755 ~/public_html/wp-content/uploads
04. Checking the Upload Path Setting
WordPress stores the upload directory path in the database. If it's set to an incorrect path, WordPress will try to write to the wrong location:
# Check the current upload path via WP-CLI
wp option get upload_path
wp option get upload_url_path
# Or check in the database directly
mysql -u root dbname -e "SELECT option_value FROM wp_options WHERE option_name IN ('upload_path','upload_url_path');"
If upload_path contains an absolute path that doesn't match your server directory, clear it:
wp option update upload_path ""
An empty upload_path tells WordPress to use the default wp-content/uploads/ relative to the WordPress installation directory.
05. Related Upload Errors
"Missing a temporary folder" - PHP's temp directory is misconfigured. See our missing temporary folder guide.
"The uploaded file could not be moved" - Same root cause (permissions) but the error occurs at a different stage of the upload process. See our uploaded file guide.
"Upload: Failed to write file to disk" - Either a permissions problem or disk space is full. Check both.
Still Can't Upload?
If permissions look correct and you're still getting upload errors, the issue may be a PHP open_basedir restriction or a ModSecurity rule. Open a ticket and we'll investigate.
Open a Support TicketQuick Recap: Fixing WordPress Upload Directory Errors
- Check if uploads/ exists - Create it in wp-content/ if it's missing
- Set permissions to 755 - Both wp-content/ and uploads/ need 755
- Fix ownership - Files should be owned by your cPanel username
- Check disk space - Verify you haven't hit your account's disk quota
- Check upload_path - Clear any incorrect absolute path in WordPress options
Last updated March 2026 · Browse all WordPress articles
