WordPress “could not create directory” fix

If you’re trying to upgrade WordPress or install a plug-in and getting the “could not create directory” error, there are two levels required to solving it.

1. Ownership
The first level is actually to make sure that your web server has ownership over the directories:
chown -R www-data:www-data your-wordpress-directory

2. Directory Permissions
The second level is also required – you must make sure that the directory permissions are properly set:

sudo find /var/www/wordpress/ -type d -exec chmod 755 {} \;
sudo find /var/www/wordpress/ -type f -exec chmod 644 {} \;

Leave Comment

Your email address will not be published. Required fields are marked *