Can't install plugin and theme Can't install plugin and theme wordpress wordpress

Can't install plugin and theme


You might also want to check the ownership of the folder: try this

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


After a clean install of Wordpress locally, add below statement

define("FS_METHOD", "direct"); to my wp-config.php file.

Later change the ownership of the wp-content and the contents inside the wp-content folder to the web server user (_www) I used the below commands.

sudo chown _www:_www wp-content

sudo chown _www:_www wp-content/*

Alternatively you can also set the permission recursively using

sudo chown -R _www:_www wp-content/


It complains about FTP credentials when it cannot access the filesystem.

Most likely your permissions are wrong (directory inaccessible by webserver)

If you ensure that your wordpress directory is owned by the same user who runs your webserver, the FTP credentials note should disappear and you should be able to install themes and plugins via Wordpress Admin console.