How to Install WordPress Plugins without FTP Access

If you are using a WordPress site on a server that uses SFTP using an SSH key, you may encounter issues while installing and updating WordPress plugins. It will ask you to enter your FTP credentials to install the WP plugin.

If you have uploaded the plugins on the plugins directory by manually uploading the files and when you go to your dashboard to install them, you will be required to enter your FTP login credentials. This issue generally comes when you don’t have the write permission to the “wp-content” directory. But if your web server has write access to the folder, WordPress will not ask for FTP details and it will take care of the installation and updates automatically.

To fix this issue, just add the below code in the wp-config.php file. Add the code at the end of the wp-config.php file.

define('FS_METHOD', 'direct');

If this doesn’t fix the issue or comes with up some error, set the ownership permission of the wp-content folder to grant the write permission. Use the below command.

sudo chown -R www-data www-data wordpress/wp-content

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.