Wordpress plugin install: Could not create directo

2020-05-21 08:06发布

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.

15条回答
放我归山
2楼-- · 2020-05-21 08:57

I had to give ownership of /plugins and /upgrade to the server, nothing else.

$ cd /var/www/wordpress/wp-content
$ sudo chown www-data:www-data /plugings
$ sudo chown www-data:www-data /upgrade

Running Apache server on Ubuntu 18.04. Maybe more dirs will need to be changed later. Anyways, I plan to restore permissions once I finish editing, as suggested in this anwser.

查看更多
一夜七次
3楼-- · 2020-05-21 08:58

wordpressProject is the project name.

/var/www/html/wordpressProject sudo chmod -R 777 wp-content

Thanks. It will work.

查看更多
何必那么认真
4楼-- · 2020-05-21 09:02

A quick solution would be to change the permissions of the following:

  • /var/www/html/wordpress/wp-content
  • /var/www/html/wordpress/wp-content/plugins

Change it to 775.

After installation, don't forget to change it back to the default permissions.. :D

查看更多
登录 后发表回答