Enable SFTP acces to my WordPress 3.3 on a dedicated server (OVH-kimsufi)

Simple objective : use the “new” WordPress feature about updates : auto-upadte for my plugins (main core as well).

The issue : on my server, FTP acces isn’t enable and … wordpress (php) doesn’t know how to deals with SFTP protocol.

Let’s teach him how to !

Sources : pascaln.com

First, install right libraries

apt-get install libssh2-php

Then modules and php tools to compile them

aptitude install build-essential php5-dev php-pear libssh2-1-dev

SSH2 installation

pecl install -f ssh2

Enable extension (doesn’t work on my side)

echo "extension=ssh2.so" >> /etc/php5/conf.d/ssh2.ini

Reload/reboot Apache

/etc/init.d/apache2 reload

In my case I had to restart Apache… my be due to ss2.ini previous step failure.

/etc/init.d/apache2 restart

Result :

As we can see on the screenshot, SSH2 option appears. Enter login and password but leave keys part empty.

All yours

Usefull links :