Notice: This website is kept as an archive. For recent content see codenoble.com.

10 September 2009

SSH Upgrades in WordPress

Upgrading WordPress plugins or even WordPress itself can be get old real quick. Especially since some popular plugins get updated fairly frequently. Fortunately WordPress has an Upgrade Automatically feature that makes the process not so painful. Unfortunately the Upgrade Automatically feature only allows you to upgrade over FTP or FTPS at first glance. However, WordPress does support upgrading over SSH if the right PHP extensions are installed.

These instructions are for Ubuntu 8.04 but will probably work fine on any Debian-based distribution and possible even others.

  1. Open a terminal and SSH into your webserver.
  2. Run sudo aptitude install libssh2-1 libssh2-1-dev.
  3. Then run sudo pecl install -f ssh2.
  4. Next run sudo nano /etc/php5/apache2/conf.d/ssh2.ini, add extension=ssh2.so to the file, exit and save.
  5. Reboot Apache by running sudo /etc/init.d/apache2 restart.

You should now see an SSH option when upgrade WordPress or its plugins.