Report this

What is the reason for this report?

Install/update plugins VESTACP Wordpress

Posted on February 9, 2016

I have Ubuntu and VESTACP running on my droplet. And Wordpress.

However, when installing or updating plugins, i get the following error: **To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Followed by a form to input FTP credentials.

How can i resolve this issue?

Thanks



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

This question was answered by @olavamjelde:

Hi,

First login as root: su

Then so we dont have to write sudo all the time: sudo su

Then we look at running processes by all users and look for php: ps aux | grep ‘php’

Now you should see in the first column somehting like www-data or whatever. This is what PHP is running as and you have to change owner of your wordpress folders and files recursivly (in all depths).

We then enter the folder outside your wordpress directory, maybe it’s something like: cd /var/www

When you are in the correct dir, you can do: ls -la …to see who owns your wordpress root directory. On my nginx install it said nobody owned html directory… But as wordpress will get the owner of the PID of PHP (who PHP is running as), you have to change owner… (it’s not enough to grant a group with write and execute).

So let’s say you found out PHP runs as www-data, then you do: chown -R www-data ./yoursubdir

I didnt have to restart my PHP but if it doesent work by simply refreshing wordpress admin, you can try to restart PHP. How you restart differs slightly depending on which PHP you are running, as the service will have slightly different name…

View the original comment

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.