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.

I’ve seen this far too many times on WordPress sites, and for a long time struggled with the solution.  I finally figured it out and since I use it without trouble every time now, I simply have to share.  While there are many things that could cause the error, in all the cases I’ve experienced, it’s been a problem with the owner of the WordPress files on the Apache server.  So the solution involves connecting to the site through SSH.  Navigate to your wordpress directory.

  1.  Find out who the web user is on your copy of apache by running this command: ps aux | egrep ‘(apache|httpd)’
    You should get a list of files and their owner, and the most common owner name will be what you want to use.  It’s probably something like ‘apache’ or ‘www-data’ or ‘root’, but for this purposes of this explanation, I will assume it is ‘www-data’.
  2. Assuming your wordpress installation is in an htdocs folder, the first thing you want to do is reset the ownership of all the wordpress files to this web user:
    chown -R www-data htdocs/
  3. Maybe not required, but you can also change the group ownership of all the wordpress files:
    chgrp -R www-data htdocs/
  4. And finally, give full privilege for the directory:
    chmod u+wrx htdocs/*

Hopefully you, like me, will now magically have back the ability to keep WordPress automatically updated again!

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *