Installing the PHP SSH module in Centos/Redhat for WordPress

If you’re running a WordPress blog in 2012 and you have any sort of server access to make configuration changes there’s really no excuse to still be using FTP to perform updates, install plugins, etc, when enabling SSH support in PHP is two steps away at most.

Most of the guides around the net were written for Centos 5 or earlier systems, when installing the PHP SSH module meant grabbing gcc, make, a bunch of deps, and then doing the install with pecl.

Thankfully this isn’t the case anymore. Now you can install the PHP SSH module on CentOS/RedHat in less time than it would take someone to steal your FTP password during a transfer. So about a minute all said and done.

1.) Have the EPEL Repository Enabled

You don’t have the Fedora EPEL repo on your CentOS server? Failure. Install it like so:

rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarch.rpm

2.) yum install away!

Now that you have EPEL installed the PHP SSH module is a quick yum away:

yum install php-pecl-ssh2

3.) Reload Apache

I decided to put this in as an after-though, It really shouldn’t count as a step.

/sbin/service httpd reload

Boom, you’re done. Now when you log in/refresh your wp-admin section you should see an SSH2 radio button next to FTP and FTPS on any update/install form.

I for one welcome our new SSH overlords.