• I’m running WordPress 5.7, self-hosted. All of a sudden whenever I try to update a plugin it asks me for FTP login information. Here’s what I’ve tried to remedy this:

    * changed the wp-content directory permissions to 777
    * added define(‘FS_METHOD’, ‘direct’); to wp-config.php
    * changed the plugins directory permissions and all plugins directories permissions under it to 777

    Nothing has worked. I’ve added the logging config to get some logs in a debug.log file, this what it says after I enter an FTP username and password:

    [28-Mar-2021 03:11:08 UTC] PHP Warning: ftp_mkdir(): Can't create directory: File exists in /home/canspice/wordpress/wp-admin/includes/class-wp-filesystem-ftpext.php on line 560

    …and when I did that on one plugin, it sat there and spun for a while. I reloaded the plugins page and it said it’d updated. I tried another plugin and that one came back with an error and now I’m in maintenance mode. 🙁

    How do I get things back to the way they were?

Viewing 3 replies - 1 through 3 (of 3 total)
  • To get out of maintenance mode delete the file in your WP route called

    .maintenance

    As for why you are being asked for FTP I don’t know, this is normally down to file ownership not being able to add files to a directory by the webserver.

    Hi. I have the same issue. Can´t update plugins by the ftp anymore:(
    It happened when I updated to 5.7.

    Anyone have any clues ??

    Regards André

    Edit::
    I fixed this by adding

    define(‘FS_METHOD’, ‘ftpext’);

    at the end of wp-config.php

    Here is to set it up for not ask for pass:

    https://digwp.com/2010/11/ftp-in-wpconfig/

    Best Regards
    André

    • This reply was modified 5 years, 2 months ago by madiman77.
    • This reply was modified 5 years, 2 months ago by madiman77.

    I fixed this by adding

    define(‘FS_METHOD’, ‘ftpext’);

    at the end of wp-config.php

    set permissions to:
    wp-content 0755
    plugins 0775

    Here is to set it up for not ask for pass:

    https://digwp.com/2010/11/ftp-in-wpconfig/

    Best Regards
    André

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Suddenly requiring FTP for plugin updates’ is closed to new replies.