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
To solve permission issue on plugins and themes on localhost or production quickly, you just run this
sudo chmod 757 wp-content/themes
sudo chmod 757 wp-content/plugins
if take care permission on production, you can run
sudo chown -R www-data:www-data wp-content/themes
sudo chown -R www-data:www-data wp-content/plugins
wordpressProject is the project name.
/var/www/html/wordpressProject sudo chmod -R 777 wp-content
Thanks. It will work.
Absolutely it must be work!
chown -Rf www-data:www-data /var/www/html
CentOS7 or Ubuntu 16
WordPress uses ftp
to install themes and plugins.
So the ftpd
should have been configured to create-directory
vim /etc/pure-ftpd.confg
and if it is no then should be yes
# Are anonymous users allowed to create new directories?
AnonymousCanCreateDirs yes
lastly
sudo systemctl restart pure-ftpd
Maybe there is an ownership issue with the parent directories. Find the Web Server user name and group name if it is Apache Web Server
apachectl -S
it will print
...
...
User: name="apache" id=997
Group: name="apache" id=1000
on Ubuntu it is
User: name="www-data" id=33 not_used
Group: name="www-data" id=33 not_used
then
sudo chown -R apache:apache directory-name
Sometimes it is because of directories permissions. So try
sudo chmod -R 755 directory-name
in some cases 755
does not work. (It should & I do not no why) so try
sudo chmod -R 777 directory-name
Maybe it is because of php safe mode. So turn it off in the root of your domain
vim php.ini
then add
safe_mode = Off
NOTE:
For not entering FTP username and password each time installing a theme we can configure WordPress to use it directly by adding
define('FS_METHOD','direct');
to the wp-config.php file.
To solve permission issue on ubuntu server, you just run this
sudo chmod 777 -R 'wordpress wp-content file location'
for example.
sudo chmod 777 -R /usr/share/wordpress/wp-content
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