Enable WordPress SSH access

SSH2 (SFTP) connections are much more secure than the regular FTP connection that WordPress supports. In this post, I will explain how to enable WordPress SSH access on a self-hosted blog running on Linux operating system. WordPress also supports FTPS, which is different from SFTP and more secure than regular FTP. But I do not use FTPS to connect to my server. This is what I did to enable WordPress SSH access (SFTP) to install, update, and delete WordPress and WordPress plugins.

Enable WordPress SSH access

sudo apt-get install libssh2-php

Once this is done, edit the /etc/php5/apache2/php.ini file (remember to back it up first).

sudo nano -w /etc/php5/apache2/php.ini

Find the section "Dynamic Extensions" and add the following under it in a new line:

;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
extension=ssh2.so

Note that there is no semicolon in front of "extension=ssh2.so". There will be several other entries with a semicolon in front. Ignore them.

Then restart your apache.

sudo /etc/init.d/apache2 restart

Now go to your connections page on your wordpress blog and Voila!.... you should see this:

Enable Wordpress Ssh Access
Wordpress Ssh Access

If you would like to optimize your WordPress URL structure to make it more search engine and user friendly, please read this post.

That is it. Enjoy!


UPDATE: This method works on Ubuntu 12.04 Precise Pangolin as well.

Be the 1 in 200,000. Help us sustain what we do.
25 / 150 by Dec 31, 2024
Join Us (starting from just $1.67/month)

Anand

Anand is a self-learned computer enthusiast, hopeless tinkerer (if it ain't broke, fix it), a part-time blogger, and a Scientist during the day. He has been blogging since 2010 on Linux, Ubuntu, Home/Media/File Servers, Smart Home Automation, and related HOW-TOs.