Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I know which linux user Wordpress uses for plugin installation

Tags:

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 ?

like image 864
Geoffrey H Avatar asked Nov 01 '12 22:11

Geoffrey H


People also ask

What user does WordPress use?

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.

Where does WordPress install Linux?

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.

How do I know which WordPress plugins are installed?

In the dashboard, go to Plugins > Installed Plugins to view currently installed plugins, then click Settings under any of the plugins listed.

How do I access wp content plugins directory?

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.


2 Answers

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?

like image 178
Ryan Avatar answered Oct 05 '22 10:10

Ryan


The Wordpress user is also the web server user, so this should work:

ps -ef | grep http

or

ps -ef | grep apache

like image 41
Tim Scollick Avatar answered Oct 05 '22 10:10

Tim Scollick