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.
And this one to restart apache:
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.