Skip to content
Advertisement

WordPress plugin install: Could not create directory

I’m using WordPress on centos 6.

I try to install a plugin. But I got this error:

Installing Plugin: bbPress 2.5.9 Downloading install package from https://downloads.wordpress.org/plugin/bbpress.2.5.9.zip

Unpacking the package…

Could not create directory.

How can I resolve this?

P/S: I run this command:

sudo -u root touch /var/www/html/wordpress/wp-content/plugins/test.txt

and it works. But I still get that error.

Advertisement

Answer

The user that is running your web server does not have permissions to write to the directory that WordPress is intending to create the plugin directory in. You should chown the directory in question to the user that is running WordPress. It is most likely not root.

In short, this is a permissions issue. Your touch command is working because you’re using it as root, and root has global permissions to write wherever it wants.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement