How to Solve WordPress “Could Not Create Directory” Error

After moving my site to Linode, I encountered issue with WordPress not being able to create directory for both new plugin installation and update. I guest everyone encounter this issue once when using a VPS or cloud hosting. This article shows my steps to fix this issue.

Here is how the error looks like:

Update theme
Install new plugin

Change ownership of site web directory to web server

chown -R www-data:www-data /var/www/html

/var/www/html folder is where I store my website. You can change it to where your web site is stored.

Set wp-content directory permission

Permission can be set easily with this command line.

sudo find /var/www/html/wp-content -type d -exec chmod 775 {} \;

If you are using FTP client like FileZilla, just right-click on wp-content folder and choose “File permissions…” to set chmod.

Leave a Comment

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