Updating WordPress and Plugins over SFTP
Most of the time when working on WordPress sites, be it uploading them for the first time, making changes, or upgrading the core and/or plugins, this would all be done via a standard FTP connection.
On a recent WordPress site we built however, the sites files were accessed via SFTP (Secure File Transfer Protocol) whereby files are transferred using a SSH secure data stream. If you’re familiar with upgrading WordPress and it’s plugins you’ll know that WordPress often asks for FTP details:
Connecting over standard FTP or FTPS wasn’t working so I needed to dig a little deeper and see how we could connect over SFTP.
Note: I know it’s possible to amend the file/folder Apache group and owner so that no FTP details are requested. We didn’t have access to change this however in this scenario.
Fortunately, a plugin has been built to assist people in this very scenario:
With this plugin downloaded and activated, you then get a new option when it comes to upgrading WordPress that allows you to choose ‘SSH2’ as the connection type. Once this was selected and the SFTP details were entered, I was then able to update the core and plugins with no problems.