WordPress.org

Forums

Install plugin via ftp not working (3 posts)

  1. gladman
    Member
    Posted 6 years ago #

    When installing a plug in, it asks for my ftp credentials. I've done this many times in the past, but the latest version gives me the error":
    Error: There was an error connecting to the server, Please verify the settings are correct.

    Any ideas what could be wrong?

  2. lldanj
    Member
    Posted 6 years ago #

    I have the same issue. Suggestions?
    Anyone...? Anyone...? Bueller...?

  3. adrian_m
    Member
    Posted 6 years ago #

    I had this problem too. Try this:
    for host name make sure it's just the host name no protocol prefix:
    host.domain.com or
    domain.com

    not ftp://host.domain.com

    if it still isn't working try adding the port number:
    host.domain.com:21

    also try adding your web root directory at the end of hostname:
    host.domain.com/web_root
    or
    host.domain.com:21/web_root

    I think there is an obscure bug in the ftp connection code I actually had to edit files and enable verbose errors;
    in
    wp-admin/includes/class-wp-filesystem-ftpsockets.php
    line 64
    uncommented
    //$this->ftp->Verbose = true;
    so that it's just:
    $this->ftp->Verbose = true;
    got another error, "Incorrect port syntax"

    I finally tracked down the problem to this file:
    wp-admin/includes/class-ftp.php
    line 272
    if(!is_long($port)) {

    for some reason this function was being passed the port number as string versus an int or long causing it to be caught by this if statement, which just stops the connection process.

    I added this above line 272:
    $port = (int) $port;

    This solved my ftp install issues, I upgraded to 2.7.1 , which now seems to work without my modification.

    Note: I only got connection type FTP working, FTPS (SSL) and SSH did not work at all, from looking in the code it doesn't seem that there's anything in there that actually tries to use those connection methods (I may be wrong, I just didn't find it)

    Has anyone else been able to use the FTPS or SSH connection type?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.