WordPress Asks for FTP Details While Installing Plugins

When you setup a WordPress on Ubuntu Linux and try to install a new plugin from plugin repository it prompts you for FTP Details.

With a few Google searches I managed to find a solution for this problem. To fix this issue all you need to do is run the following command on your terminal.

sudo chown -R www-data:www-data /[folder-path]/[name-of-your-project-folder]

You can also fix this issue by adding following line to your wp-config.php file.

define('FS_METHOD', 'direct');

See Also: How to Get Featured Image Thumbnail URL Using WP REST API

Leave a Comment.