Apache/Linux configuration changes to make automatic upgrade more straightforward

The simplest answer is:

As long as you’re on a fairly standard RedHat/CentOS/Fedora server, make sure that everything under your WordPress directory belongs to apache:apache. This will prevent the prompting for FTP credentials.

The advantage to doing it this way is that, in almost ALL situations, Apache has /bin/false or /sbin/nologin set up as its shell. This prevents anyone from exploiting the apache user to gain shell access to your box.

I think you’re likely getting tripped up by directories inheriting permissions from users with valid shells whose umasks are set funny. Try chown’ing everything to apache:apache and do a couple of test updates and see if that doesn’t fix 99% of the issues you’re running into.

Leave a Comment