Unable to install WordPress plugins

Posted June 23, 2015 19.2k views
NginxUbuntuPHPWordPressDigitalOcean Articles

I followed this example to set up my wordpress instance.

I am unable to install/ update plugins through the WordPress Admin UI. It keeps asking me for the FTP username/ password, and even after I enter those information, the files are still not installed.

I can upload files through the Media however, so it doesn’t seem like a file permissions issues to me.

Does anyone know what are some possible solutions I can try?


These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

This question was answered by @UKn0Me:

After running chown, you’ll probably need to add define('FS_METHOD', 'direct'); to wp-config.php to force it to stop using FTP.

View the original comment

Use this code , wordpress asking for ftp details because wordpress doesn’t have permission to write in your server.
use these two commands in terminal.

$sudo a2enmod rewrite
$sudo chown -R www-data /var/www

video guide