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!
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…
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.