WordPress Upgrade Permission Hacking in Linux Mint

If your WordPress host provider is worth their salt you enjoy one-click WordPress plugin and version updates on your production site. Our job is to make sure plugin and version updates are one-click on our development Linux Mint machines as well.  We want to avoid the following types of errors in other words.

First thing to do (and we only have to do this once) is to add a group write flag to the wp-content folder.  We want it to look like this, with the wp-content folder writable for group www-data, the Apache server user account group.

Okay, that gives us plugin one-click updates, now what about one-click WordPress updates?  For that we have to jump to the command line before the upgrade and again afterward.

WordPress needs the entire site to be owned by the same account that runs the website. There are different philosophies on WordPress site ownership depending on the environment, but these updates work with default Apache2 permissions in Mint.  We want our site and all files to be owned by user “www-data.” We’ll do this before we launch the WordPress Update in our site admin dashboard.

We’re good to go and can update our site to the latest and greatest version of WordPress.  Once complete we’ll return the command line to revert the site to it’s prior permissions so we can work in it.

One click! (Plus a little bit of typing…)