Unable to create directory 📝 WordPress

WordPress: Unable to create directory wp-content/uploads/2026/10. Is its parent directory writable by the server?

PHP can’t write to wp-content/uploads — wrong ownership/permissions, a wrong upload path, full disk, or open_basedir restrictions.

Seen on: WordPress

Meaning

The web server user (www-data, apache, nginx, or the PHP-FPM pool user) must own or be able to write uploads/. Migrations often leave an old absolute upload_path in Settings → Media or the options table.

Common causes

  • uploads/ owned by another user
  • Permissions too strict (or set to 444)
  • Old absolute upload_path after migration
  • Disk full or quota exceeded
  • open_basedir restriction

⚡ Quick fix

  1. Set ownership to the PHP user and 755/644 permissions
  2. Clear upload_path in wp_options (Settings → Media)
  3. Check disk space

Detailed fix by platform

Linux

  1. bash
    sudo chown -R www-data:www-data /var/www/html/wp-content/uploads
    sudo find /var/www/html/wp-content/uploads -type d -exec chmod 755 {} \;
    wp option get upload_path

How to diagnose

  1. Owner — PHP process user vs folder owner
  2. Path — upload_path option
  3. Disk — df -h

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

🧠 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.