I'm trying to setup Wordpress to be able to install plugins via SFTP (SSH) on a Centos 6 VPS.
I've been able to modify wp-config
so it uses the right credentials with user
as my SFTP user.
Now I have a permission related problem, as if I do a chmod 777
on my wp-content
folder I'm able to install, but with the normal permissions it can't create folders.
I'm using Nginx and all my wp-content
files and folders are owned by user
and I've tried setting the group to nginx
but it doesn't work.
I also tried setting the user as nginx
but still no luck.
UPDATE : I found out wordpress was using apache
as user but I want to change this to my user
instead. How can I do this ?
Both user roles and permissions are set by the Administrator, which is typically the WordPress site owner. By default, there are six different user roles: Super Admin, Administrator, Editor, Author, Contributor, and Subscriber. Each role has its own set of capabilities, which we'll discuss in more detail below.
WordPress generally is installed in the root directory or at the same as your website URL points it. For example, could be in the root directory. /WordPress could be in the /WordPress folder. wp-config. PHP.
In the dashboard, go to Plugins > Installed Plugins to view currently installed plugins, then click Settings under any of the plugins listed.
So, in order to access it, all you need to do is log in to your FTP server (for example, via FileZilla). Depending on your host's setup, you might have to click through to another folder like public_html to get to your site, however, once you are there, that's exactly where you will find the wp-content directory.
On your production server, in your WordPress index.php file, at the top, you can temporarily put echo(exec("whoami"));die();
Then browse to your WordPress site and see what user was running. On Ubuntu, mine was www-data
.
This was useful for me for: Can I install/update WordPress plugins without providing FTP access?
The Wordpress user is also the web server user, so this should work:
ps -ef | grep http
or
ps -ef | grep apache
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With