Website Information:
Protocol : SFTP
Server : Google Cloud
Wordpress Version : 4.9.8
I am trying to update my WordPress plugins but every time I try to do it, it always asks me for my FTP information but when I supplied my FTP information it returns an error 'Failed to connect to FTP Server.'
I even tried to add Port number '21' and '22' on the hostname but it still doesn't work. I even tried using 'FTPS (SSL)' Connection type but it didn't work either. I've also used the plugin 'SSH SFTP Updater Support' but it leaves my website under maintenance and I can't access it anymore.
I've spent 2 days resolving this problem. Hope that someone can help me with this.
Thank you in advance :)
If only FTP and FTPS (SSL) appear as options on WordPress when installing plugins, etc., then installing the PHP extension for SSH2 will automatically add an SSH2 option (for SFTP) to WordPress.
For example, on Ubuntu:
sudo apt install php-ssh2
And restart the web server (e.g. Nginx or Apache).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With