Are you seeing an error like this in your FTP client log?

Error:    Connection timed out after 20 seconds of inactivity
Error:    Could not connect to server

This article shares six ways that you can try to fix this error, and connect to your server!

 

  1. Maybe it just needs more time to connect. Try increasing the connection timeout duration. For example, in FileZilla, navigate to Edit » Settings » Connection, and increase the Timeout value:
    FTP Connection Timeout Setting in FileZilla
    You can disable the Timeout entirely by setting it to 0.
     
  2. Review your settings. If you have access to cPanel, navigate to Files » FTP Accounts, scroll to your account, and click "Configure FTP Client." Next, click to download the "FTP Configuration File" (for FileZilla, CoreFTP, or Cyberduck) in the new "Configuration Files" area.
    Here is a sample XML configuration file generated by cPanel for FileZilla:
    <?xml version="1.0" encoding="UTF-8" standalone="true"?>
    <FileZilla3>
        <Servers>
            <Server>
                <Host>ftp.doontoon.com</Host>
                <Port>22</Port>
                <Protocol>1</Protocol>
                <Type>0</Type>
                <User>doonjub8</User>
                <Logontype>2</Logontype>
                <TimezoneOffset>0</TimezoneOffset>
                <PasvMode>MODE_DEFAULT</PasvMode>
                <MaximumMultipleConnections>0</MaximumMultipleConnections>
                <EncodingType>Auto</EncodingType>
                <BypassProxy>0</BypassProxy>
                <Name>ftp.doontoon.com</Name>
                <Comments/>
                <LocalDir/>
                <RemoteDir/>
                <SyncBrowsing>0</SyncBrowsing>
                ftp.doontoon.com
            </Server>
        </Servers>
    </FileZilla3>
    
    Import the configuration file into your FTP client. (E.g., in FileZilla, navigate to File » Import…).

    If you do not have access to cPanel, search the website of your webhost for manual FTP settings. They will look something like this:
    FTP Username: [email protected]
    FTP server: ftp.bigbeartools.com
    FTP & explicit FTPS port:  21
    Use these values and try connecting again.
     
  3. Are you using Cloudflare? This means you won't be able to use a domain name as the "Host" address. You will need to use the direct IP address of your host's server. E.g., instead of ftp.doontoon.com, you'll use something like 174.127.108.27. You can find the IP address in the cPanel side panel, under General Information » Shared IP Address. If you can't find your server's IP address, you'll need to contact your host.
     
  4. Try switching from SFTP to FTP, or vice-versa. For example, in FileZilla, navigate to Site Manager » General » Protocol, and change SFTP to FTP, or FTP to SFTP. You might need to click to trust a certificate when you connect via regular FTP.
     
  5. Try switching from Passive Transfer Mode to Active, or vice-versa. In FileZilla, navigate to Edit » Settings » Connection » FTP and change from Passive to Active, or from Active to Passive.
     
  6. Post a question at superuser.com, or contact your webhost's technical support. ????