Fun with WP-CLI

I’ve started to replace manual interventions after a code deploy with scripted interventions that Bamboo can run for me.

While getting this figured out, there have been a few things with wp-cli that were confounding and there seem to be some limitations to the documentation, so I am going to record those things here. For posterity.

First problem: the version of php-cli that we routinely use is not all that up to date. As in, 4.3. This is the default when we call php on the command line and I wasn’t in a position to get it updated quickly so I needed to point wp-cli to another php-cli build.

Continue reading “Fun with WP-CLI”

Putting WordPress in maint mode during a Bamboo deployment

It occurred to me that I should shut users out of WordPress while code deployments are taking place, particularly now that the process is going to take longer because I’ve got WP-CLI working within Bamboo, and will use it to script the movement of content, menus, and settings between instances after a code deploy. This means the site will be in limbo for a longer period of time and there will be more opportunity for things to get all screwed up during deploy.

I cribbed from the code in WP core that puts the site in maint mode during an update. The code is nothing special, and certainly hasn’t been extensively tested, but I will include it here in case it’s useful to someone else:

Continue reading “Putting WordPress in maint mode during a Bamboo deployment”

Shoehorning a web site build into Agile

So agile (the software development methodology) is great, and in theory you can use it for “anything”. I might need to have a sidebar later on vague terms like “anything” when used in this way, but I am going to be disciplined for now and not digress.

My team took an agile class last week, and the example given to us was “building a house”. As in, in theory you could follow an agile methodology to build a house. I am pretty sure that would be a bad idea, but I’m not an builder so…  anyway, I am a web site developer and while agile actually works well for us in some ways, there are specific ways in which it feels like we’re shoehorning our project into – let’s carry out the metaphor here – a pair of really pointy shoes that are poorly made so the toebox squeezes you painfully all the time.

I will again refrain from a sidebar, this time about how shoes can be pointy and comfortable if they are well made.

Here are the issues we have with agile.

Continue reading “Shoehorning a web site build into Agile”