My nginx user is www-data. If I do su www-data I can create both file and directory.

But when installing plugin I am asked for FTP credentials.

I tried to give the public_html directory 777 permissions for a while to test if I can install plugin without providing FTP credentials but it didn't help either.

  • WP 3.2.1
  • nginx
  • ubuntu

How can I install plugins without providing FTP credentials.

2 Answers 2


You can set this in the wp-config.php, check the Editing wp-config.php page in the docs.

  • Yes, I can but I don't want to for reasons (security etc..)
    – Radek
    Commented Jul 17, 2011 at 10:43
  • @Radek if someone got as far as your wp-config.php - there is no security left to worry about.
    – Rarst
    Commented Jul 17, 2011 at 11:14
  • @Rarst: you're right ... but when searching for answer before posting my question. I found above solution. And somebody mentioned security reasons why not to do so.
    – Radek
    Commented Jul 17, 2011 at 11:28
  • 1
    @Radek, it's better to add FTP credentials to the wp-config.php than to add it to your database (the fields you can fill in during the update process). When you paste them directly into the wp-config.php they're not send through POST like the default process (that's why it's safer).
    – Hiranthi
    Commented Jul 18, 2011 at 13:07

The owner of the files must be php user. To have php user in the group is not good enough.

  • What is 'php user'?
    – AlxVallejo
    Commented May 12, 2014 at 12:47
  • A user that php is running under.
    – Radek
    Commented May 14, 2014 at 2:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.