WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hi I set up wordpress on a VPS and I'm running into two problems:

  1. Either WordPress asks for ftp details in order to update plugins or delete them


  1. Through FTP I cannot delete files as I get a permission denied error.

Problem 1 is solved by running: sudo chown -R www-data public_html

Problem 2 is solved by running: sudo chown -R myusername public_html

Solving one problem creates the other apparently. I want to be able to login with my user to ftp and modify anything, while I also want wordpress to be able to update plugins and such things. Am I doing something wrong?

share|improve this question
up vote 0 down vote accepted

you can run something like

sudo chown -R myusername:www-data public_html

it will solve both the problems together

share|improve this answer
I tried that and it seemed to work, however now I am being asked for ftp details again when I try to install a plugin. – drtanz Jul 19 '11 at 11:37
ok then try this 'sudo chown -R www-data:myusername public_html' see it it works. – Amit Singh Jul 21 '11 at 6:20

chown www-data:www-data public_html/ -R

On Ubuntu and Debian apache & php run as the www-data user and www-data group so any files that php needs to be able to write to have to be owned by the user and group.

share|improve this answer

Try setting the sticky bit on your permissions

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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