Server Pilot and Wordpress: WP cannot access webserver

October 12, 2014 4.4k views

Hello,

I have just created my first droplet and am using Server Pilot to manage my server. Server Pilot's uses a custom LAMP/LEMP stack. I followed their tutorial on installing Wordpress on my server here: https://serverpilot.io/community/articles/install-wordpress-on-ubuntu.html.

The installation went well and everything seemed fine, but when I tried to install or delete plugins, I was unable to do so, and I get a message on Wordpress that shows this:

"Connection Information
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."

Server Pilot has tutorials on how to install plugins, but they never mention this big problem. If anyone can help me solve what is wrong here, I would be extremely grateful.

Thanks so much!

2 Answers

I found out the answer for anyone else having this problem!

ssh into your server and use this command, which is basically what kamaln said, except that it applies to the whole app folder:

sudo chown -R serverpilot:serverpilot /srv/users/serverpilot/apps

An explanation can be found here: http://serverpilot.io/community/articles/how-to-fix-file-permissions.html

Thanks to kamaln and the Server Pilot team for such quick responses!

  • Thank you for posting the answer, as well as the ServerPilot article link. Saved me who knows how much time and headache!

You need to grant your webserver permission to write to the plugins directory. SSH into your droplet and run the following command:

sudo chown -R serverpilot:serverpilot /srv/users/serverpilot/apps/your-app-name/wp-content
  • Hey kamaln thanks for the help. Unfortunately, I still get the error...do I need to reset anything? It's weird, because based on what you said it seems like it should work. Also, just fyi, you forgot to add "public" in the command you gave:

    sudo chown -R serverpilot:serverpilot /srv/users/serverpilot/apps/your-app-name/public/wp-content
    

    I spent the whole day to learn how to install everything and I feel like I'm back at step 1. :( Also, do you think you might know the reason that I cannot drop files into my server via SFTP? Is it related?

    Thanks again!

    • I ran into the same error today and only granting permission to the /wp-content/ dir didn't worked. I did this to fix my problem:

      sudo chown -R serverpilot:serverpilot /srv/users/serverpilot/apps/your-app-name/
      
Have another answer? Share your knowledge.