Regulary, each time my iMac for dev. is updated (now high Sierra 10.3.6), each time the FTP of MacOs server is discontinued (stopped) : impossible to use Fetch and FTP to update wordpress in web local server or mamp instance.
Again, after spending more than multiple hours searching useful posts or forums, here is resumed how to update ftp and activate sftp:
Step #1 : update ftp install via brew
if brew is installed, with homebrew you can accomplish this with the following brew command:
brew install inetutils
be patient, the process takes time and time to time is verbose
Step #2 : test ftp – the connection
if ftp is well installed, use terminal
bash-3.2$ ftp localhost
ftp: connect to address ::1: Connection refused
ftp: Trying 127.0.0.1 …
ftp: connect to address 127.0.0.1: Connection refused
ftp: Trying fe80::1%lo0 …
ftp: connect to address fe80::1%lo0: Connection refused
ftp: no response from host
ftp>
enter quit to recover here bash terminal
At this step, it was impossible to log with ftp (port 21) protocol and username/password 🙁 !
Step #3 : authentication via ssh (thanks to MAMP support)
• Go Mac OSX System Preferences => Sharing.
• Enable Remote Login.
You will see:
Remote Login: On
To log in to this computer remotely, type “ssh username@xxx.xxx.x.xx”.
Step #4 : set ftp client (here fetch)
In your FTP client, create a new SFTP connection with the settings:
• Server: xxx.xxx.x.xx
• User Name: username
• Password: your user password for the system
Step #5 : configure wp-config to enable automatic core or plugin updating
define(“FTP_HOST”, “xxx.xxx.x.xx:22”);
define(“FTP_USER”, “username”);
define(“FTP_PASS”, “your user password for the system”);
define(“FTP_SSL”, true);
define(“FS_METHOD”, “ssh2” ); // need ssh-sftp-updater-support plugin in localhost wp server if php server don’t have ssh2 extension
This plugin – ssh-sftp-updater-support – available in wp repository is important if php install of apache server don’t have ssh2 extension.
And now all is working with sftp … until the next macOSX update !