Tito Miguel Costa
Refactoring ideas

Configure apache user in VirtualHost

Change the default www-data

It is possible to update WordPress from the administration area and also install new plugins and themes. But for this to work, we need to set the proper permissions on the server side.

To make things easier, and allow several WordPress instance to be run for different users, instead of giving write permissions to the default www-data user in my Ubuntu box, I decide to install the module apache2-mpm-itk.

$ sudo apt-get install apache2-mpm-itk

After that, we just have to configure the VirtualHost to use a user and group

<IfModule mpm_itk_module>
    AssignUserId USER GROUP

After restarting the apache service, no more the boring ftp screen to update the WordPress instance.

All the other VirtualHosts will use the default apache user and group, www-data in Ubuntu and apache in Fedora.

8 February, 2013
Apache, Wordpress