I succesfully set up a VPS LEMP-stack with Wordpress. When I am trying to install plugins from the WP backend, I am prompted with the following message:
To perform the requested action, WordPress needs to access your web server.
Please enter your FTP credentials to proceed. If you do not remember your
credentials, you should contact your web host.
When I enter my SFTP-account details, which I am using to access the server with FileZilla, I get the following error message:
Failed to connect to FTP Server 192.XXX.XXX.X:21
I read various tutorials, which suggest to install a FTP server, in particular vsftpd and then to store your FTP-User-details in the wp-config.php to avoid further authentication requestst. The problem I see is that, FTP is considered as severly unsecure and I would like to avoid hard-coding my user details into my WP-installation.
What is the safest, recommended way to deal with this problem?
sudo adduser <username> www-data sudo chown -R www-data:www-data /var/www sudo chmod -R g+rw /var/www
– Willenewillet