WordPress: Installation failed: Could not create directory (plugin/theme install or update)
WordPress can’t write to wp-content/plugins, themes or upgrade — ownership/permissions or disk space.
Seen on:
WordPress
Meaning
Plugin/theme installs unpack into wp-content/upgrade first. If those folders are owned by another user (e.g. root after an FTP/SSH upload) or the disk is full, installation fails.
Common causes
- wp-content/plugins, themes or upgrade not writable by PHP
- Folder created by root/another user
- Disk full
- Security hardening (DISALLOW_FILE_MODS)
⚡ Quick fix
- Fix ownership of wp-content to the PHP user
- Create wp-content/upgrade with correct ownership
- Free disk space
Detailed fix by platform
Linux
- bash
sudo chown -R www-data:www-data /var/www/html/wp-content sudo -u www-data mkdir -p /var/www/html/wp-content/upgrade df -h /var/www
How to diagnose
- Owner — Folder owners
- Disk — Free space
- Config — DISALLOW_FILE_MODS / FS_METHOD
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- Call to undefined function (WordPress) WordPress: Fatal error: Uncaught Error: Call to undefined function wp_get_current_user() / add_action() / get_header()
- Call to undefined function create_function() WordPress on PHP 8: Fatal error: Uncaught Error: Call to undefined function create_function() / each()
- Critical error WordPress: There Has Been a Critical Error on This Website
Most viewed in WordPress
Other ways to find it
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 7 Oct 2026