Home > Linux, Servers, Tech > [Solved] WordPress automatic upgrade and nginx

[Solved] WordPress automatic upgrade and nginx

September 12th, 2009 cyprix Leave a comment Go to comments

With my slow move over to nginx I’ve been finding the odd niggle to solve. Today’s one was the inability for my wordpress installations to use the automatic upgrade facility whilst running on nginx. Instead it kept asking to fall back to ftp for upgrading.

On apache, this can occur when your wordpress directory does not have write permissions for the apache user. But I’d already checked that. So I got thinking…

Since nginx and php fastcgi are separate processes I checked the users they were running under – lo and behold the php-fcgi was running under root!!! Big oops! Solution: change php-fcgi to run as user nginx & group nginx (same as the nginx server under Mandriva). As I currently use the spawn-fcgi program I changed by init.d file to use the user and group options as shown below.

/usr/local/bin/spawn-fcgi -u nginx -g nginx

All fixed :)

At some stage I’ll post my init.d file for php-fcgi and my nginx configuration files once they become somewhat stable.

Categories: Linux, Servers, Tech Tags: , , ,
  1. No comments yet.
  1. No trackbacks yet.