Using SSH instead of FTP for WordPress updates

Under certain server configurations and conditions, WordPress may require an FTP connection to retrieve and process core, plugin, and theme updates.  If you only see an option for FTP on this screen, do not despair.  You are not alone!  If a server is without the libssl2 library and PECL’s ssh2 package, the SSH2 option will not be listed.  While there are WordPress plugins that mimic this capability using various PHP libraries, implementations at the server level often provide better security and performance.

  1. Download libssh2 (C library implementing SSH2 protocol)
  2. At the command line, type the following
    # Unzip the libssh2 archive
    tar -xf libssh2-1.4.3.tar.gz
    
    # Change directory to libssh2 source
    cd libssh2-1.4.3
    
    # Compile libssh2
    ./configure
    make && make install
    
    # Install ssh2 PECL library
    pecl install ssh2-beta
    

After that, the SSH2 option should appear on the WordPress update screen.
WordPress SSH updates

One thought on “Using SSH instead of FTP for WordPress updates”

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>