WordPress asking for FTP credentials to install plugins

wordpress update

Step 1:
Try to add the code in wp-config.php:

define('FS_METHOD', 'direct');

Step 2:

Change /var/www folder  ownership  to  www-data

sudo chown -R www-data:www-data /var/www/

If you dont know the root user then just create a php script and following line of code and visit the page.

<!--?php echo (exec("whoami")); ?-->

Leave a Reply

Your email address will not be published. Required fields are marked *