After restoring FTP server in High Sierra, how to log in to localhost?
I finally solved my problem.

#set file ownership so we can update WP
#https://www.fetchdesigns.com/blog/failed-to-connect-to-ftp-server-localhost21-wordpress-on-mac/
sudo dseditgroup -o edit -a &lt;your username&gt; -t user _www
sudo chown -R _www:_www &lt;path_to_wordpress&gt;
sudo chmod -R g+w &lt;path_to_wordpress&gt;

sudo chmod 777 .htaccess
sudo chmod 755 &lt;path_to_wordpress&gt;/wp-content/uploads


Hope this helps someone else.