Enable WordPress SSH access

Write for Us: Familiar with Smart Home Automation, Media Streaming, HTPC, and Home Server topics? Write for us and get paid. Writing experience not required. APPLY HERE.

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 ;

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.

Did this post help you?
SmartHomeBeginner brings in-depth tutorials easy enough to understand even for beginners. This takes a considerable amount of work. If this post helps you, please consider supporting us as a token of appreciation:
  • Feeling generous? Become a Sponsor (discounted options) or a Patron. You will receive privileges on our Discord Server.
  • Just want to thank us? Buy us a Coffee or a Ko-Fi.
  • May be another day? Shop on Amazon using our links. Your prices won't change but we get a small commission.
  • Don't feel like spending? You can still show your support by sharing this post, linking to it in forums, or even commenting below.


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.