If during installation of a plugin, WordPress asks for your hostname or FTP details. Then follow these steps:
1) Login to your server and navigate to /var/www/html/wordpress/.
2) Open wp-config.php and add this line after define(‘DB_COLLATE’)
3) Add the following line – define(‘FS_METHOD’, ‘direct’);
4) If you get “Could not create directory” error. Give write permissions to your wordpress directory in recursive as— chmod -R go+w wordpress
5) After this go to the site and try to install the plugin, you will be able to install it.

Leave a Reply