Wordpress Permissions LEMP CentOS 7

Posted September 15, 2017 2.4k views

I changed the user and group in my /etc/php-fpm.d/www.conf from

user = php-fpm
group = php-fpm


user = nginx
group = nginx

And Wordpress has no problems reading/writing to it’s wp-content directories

But after I do this it breaks my phpmyadmin folder and keeps it from loading at all until I change it back to php-fpm for the user:group.

How can I fix this so Wordpress can read/write as nginx:nginx but still be able to access my phpmyadmin that runs as php-fpm?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

Why not add them to the same group?
That’s usually the point of groups.

I did add nginx to the php-fpm group and got nothing.

usermod -aG php-fpm nginx

[bryce@XXXXXX~]$ groups nginx
nginx : nginx php-fpm
[bryce@XXXXXX~]$ groups php-fpm
php-fpm : php-fpm nginx

I am using php7