Since WordPress 2.7 there is this cool feature Automatic Update. But by default this will use FTP. As FTP is an insecure protocol (Which I don’t have installed on my server), I was looking for a way to update via SSH/SCP and luckily Wordpress does support this feature.
I’m going to explain how to enable SSH on your server as this isn’t installed by default.
On Ubuntu just execute the following commands, this will install the SSH2 extension for PHP:
apt-get install libssh2-1-dev libssh2-php
Now test if PHP recognizes it’s new ssh2 extension by running (This will only work when you’ve install the php-cli package):
php -m | grep ssh2
After this restart Apache:
service apache2 restart
Now you are ready to use the automatic update of WordPress via SSH. As shown below it’s important to set the connection type to SSH2 in the connection information and enter the correct SSH credentials.
Please note: Always take a backup before doing an update!