I have a WP site running on Ubuntu 11.04. I set the apache www-data user to have write permissions on the entire wordpress directory recursively. This made it possible to update the plugins automatically, but the site upgrade functionality is prompting me for FTP credentials. How do I get that screen to work for updates without using FTP?

3 Answers 3


Easiest way: Use mod_suphp instead of mod_php. This should just be a matter of using whatever ubuntu's package manager is to remove mod_php and install mod_suphp instead.

mod_suphp is a slightly modified version of mod_php. It does the same thing, but it sets the user of the apache process to be the same as the owner of the PHP files when the PHP executes. This gives PHP the proper permissions to be able to modify the PHP files owned by that user.

This is actually more secure on a shared hosting environment, because in case of a break in via the web, the intruder only gains the privs of the one user account and can't access files outside that user account (whereas with the apache user credentials, he has greater access to many hosting accounts).

Anyway, with mod_suphp or any setuid method for running php scripts, this will let WordPress recognize that it can create files with the proper ownership and thus it will use the direct mode for upgrading itself.


You can permanently store the FTP credentials in wp-config.php. Add the following to this file:

define('FTP_HOST', 'ftp.example.com');
define('FTP_USER', 'user');
define('FTP_PASS', 'password');
define('FTP_CONTENT_DIR', '/home/username/public_html/wp-content/');
define('FTP_PLUGIN_DIR ', '/home/username/public_html/wp-content/plugins/');

This will prevent WP from prompting you for the credentials, and will use the values stored in wp-config.php instead.

  • Can this also be done using scp?
    – grm
    Aug 16, 2011 at 9:59

If this is a local test site you could do this :

chown -R nobody:nobody /path/to/wordpress

If it's a live site it might be unsecure though.

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.