Unable to install WordPress plugins

June 23, 2015 5.3k views
WordPress DigitalOcean Articles PHP Nginx Ubuntu

I followed this example to set up my wordpress instance.

https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-nginx-on-ubuntu-14-04

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?

4 comments
  • try this:

    sudo chown -R www-data:www-data /var/www
    
  • After running chown, you'll probably need to add define('FS_METHOD', 'direct'); to wp-config.php to force it to stop using FTP.

  • Thanks. Using define('FS_METHOD', 'direct'); did stop the FTP pop-up, but it seems like the file changes didn't stick.

    I'd update a plugin, and the UI says it's updated. Upon refreshing the page, the plugin goes back to the original version before the update. What gives?

  • Hi,

    My WP website is running on docker container. How to fix the problem above ?

    Thanks !

1 Answer

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

Have another answer? Share your knowledge.