I turned up my WordPress Blog today, and went to install a new theme, and the only option available was FTP. I don’t run FTP on my server, everything I do is via SFTP.
I went searching and found this answer as to how to enable other methods for file upload in wordpress, including SFTP, and direct.
To get SFTP working on my FreeBSD server it boiled down to this simple command to install the SSH2 PHP Extension.
portmaster security/pecl-ssh2
And this one to restart apache:
/usr/local/etc/rc.d/apache22 restart
Direct file mode can be enable by following the recommendations here for file permissions:
File permissions: all of your WordPress files must be either owner writable by, or group writable by, the user under which your Apache server executes.
via Can I install/update wordpress plugins without providing ftp access? – Stack Overflow.