How to configure WordPress to automatically install plugins and themes without FTP
This is going to be a short tip, I just found out (and got annoyed) that the recent versions of WordPress are configured so when you try to install a new plugin or a new theme, it will work only with FTP. If you want to allow WordPress to install plugins without FTP or install themes without FTP, follow the following steps:
Open to edit wp-config.php
Enter your WordPress folder, and look for the wp-config.php file on the main folder. You can do that either locally – on your computer – or directly on your server.
Add a define(‘FS_METHOD’,’direct’); command
Add the following line in the beginning of the file (or just after the other “define” commands):
define('FS_METHOD','direct');
Save the file and FTP it to the server
Now save the file and FTP it to the server. Once done, when you try to install themes or plugins in your dashboard, it should work just fine
Good luck 🙂
Eran