• Hi,

    When updating WordPress plugins, there’s a prompt for the FTP login:

    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.
    Hostname: host
    FTP Username: user
    FTP Password: pass
    Connection Type: FTP or FTPS (SSL)

    This works fine, except if it’s host uses SFTP over SSH with Port 22.

    Failed to connect to FTP Server host:21

    It will attempt to always use port 21 as well.

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

    This is the user’s permission problem.

    step-1: First open wp-config.php file of your WordPress installation folder.
    step-2: Copy below code and paste it at the end of the wp-config.php file.

    define('FS_METHOD','direct');

    Make sure ownership permissions are set to Apache so that WordPress can update and/or install plugins without requiring FTP credentials. You can set permissions via SSH.

    Single site hosting:

    chown -R apache:apache /var/www/html

    Hope this helps.

    Thanks.

    Worked like a charm. Thank you.

    Perfect! This is the solution!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Update Plugins FTP (requires SFTP over SSH)’ is closed to new replies.