I am using wordpress on server which uses sftp using ssh key only. I want to install and update WordPress plugins, but it seems you need to enter your FTP login to install plugins. Is there maybe a way to install and upgrade plugins by uploading files manually instead of having WordPress handle the whole process?
Solutions of the install/update WordPress plugins
WordPress will only prompt you for your FTP connection information when trying to install update WordPress plugins or updates to WordPress themes if it cannot write directly to /wp-content. Otherwise, if your web server has write access to the required files, it will automatically take care of updates and installations. This method does not require you to have FTP/SFTP or SSH access, but it does require you to set up specific file permissions on your webserver.
It will try the different methods in sequence, and fall back on FTP if the Direct and SSH methods are unavailable.
WordPress will attempt to write a temporary file to the directory in your /wp-content directory. If it succeeds, it compares the ownership of the file with its own UID, and if there is a match it will allow you to use the ‘direct’ method of installing plugins, themes or updates.
Now, if for some reason you don’t want to rely on autocheck which filesystem method to use, you can define a constant, ‘FS_METHOD’, in your wp-config.php file, which or So ‘direct’ is ‘ssh’. ‘, ‘ftpext’ or ‘ftpsockets’ and it will use that method. Keep in mind that if you set this to ‘direct’, but your web user (the username under which your web server runs) does not have the proper write permissions, you will receive an error.
In short, if you don’t want (or you can’t) change the permissions on wp-content your web server has write permissions on, then add this to your wp-config.php file: As none of the permits work anymore. You need to change the permits accordingly and put the following in your wp-config.php:
Read more: What Is WordPress, Used For?