Tuesday, December 17, 2013

Can't update wordpress on Ubuntu

I had a wordpress installation on an Ubuntu 13 machine but was unable to update the wordpress. I thought it was due to rwx permission problems but it turned out it was not.

The wordpress folder should be of group "www-data" if you're using apache. Apache by-default runs with www-data group and user. So if your wordpress folder does not belong to this group, apache can not copy the newer version in this folder so it says "I could not update."

I found the solution by following the inverse of the instructions here ( stylishjm at the bottom ).

She said we could change the user and group of apache to our own username but that cause some other problems since it caused:
 ... waiting /var/lock/apache2 already exists but is not a directory owned by "username"

So instead of changing apache's username, I changed the group of wordpress folder:

chgrp -R www-data wordpress

Hope that helps.

No comments: