• Resolved dgwicks

    (@dgwicks)


    When I try to update WP or add a theme through the dashboard I get the error

    “Please enter your FTP credentials to proceed.”

    In a fit of frustration I changed all of the WP dirs and files to 777 but it still doesn’t work. What do I need to do??

    I am running on my localhost, Debian/linux and apache2

Viewing 4 replies - 1 through 4 (of 4 total)
  • Curious, if you were to log in via FTP to the directory can you edit the files? Depending on how the folders are arranged that could be the issue.

    Hello dgwicks,

    This is user’s permission problem. You can contact your hosting and request them to give appropriate permission.

    As an alternative you can Try to add the code in wp-config.php:

    define(‘FS_METHOD’, ‘direct’);

    Also, there are some steps which can be performed if you have the server access and technology to execute some commands.

    Let me know if you have any further query.

    Thanks.

    Dion

    (@diondesigns)

    Since you posted this in localhost and stated it was a localhost installation, I’ll assume that’s what you have.

    This issue is being caused by an ancient Apache/PHP configuration where PHP does not run as the owner of the front-facing filesystem. There are two ways to fix this. The best is to change the Apche and PHP configurations so PHP runs as FastCGI, preferably using PHP-FPM. There are many online guides to help you install and set up PHP-FPM.

    The second is to change the Apache configuration so it runs as the owner of the front-facing filesystem. This is the easier method of the two, but it requires a localhost/LAN setup. First, locate and edit your Apache configuration. You should find a line that looks something like this:

    Listen 0.0.0.0
    

    Change it to look like this:

    Listen 127.0.0.1
    

    If you are on a LAN, you can also use the local IP address assigned by the LAN to your system. Next, find two lines that look something like this:

    User www-data
    Group www-data

    The www-data entries could also be values like nobody or apache. You’ll want to change both values to the user that owns your front-facing filesystem. Now save the file(s) and restart Apache, and your problem should be fixed. If everything works correctly, you can restore the permissions of the WP files/directories to 0644 and 0755.

    If you are not a localhost or LAN setup, the above changes will break your site. If that happens, restore the original values, restart Apache, and use the first method instead.

    Thread Starter dgwicks

    (@dgwicks)

    @diondesigns; Thank you! You were the only one that picked up on “localhost”.
    Maybe I should have put it on the first line!

    Changing user:group to ww-data: solved the problem. Everything works as designed.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Can’t update WP or themes’ is closed to new replies.