Escape into code

Not gonna lie, this last month has been hard.

What I’ve learned is that it’s very, very easy for me to escape into solving a coding or technical problem when my leadership duties are overwhelming. The corollary to that is that it’s almost physically painful to stop solving the problem before it’s as solved as I wanted it to be. In this kind of situation, I wanted the problem to be very thoroughly and completely solved. 80/20? Never heard of it! 100% all the way!

Continue reading “Escape into code”

Two embarrassing things I did not get about WP-CLI at first

First things first

So in a previous entry I said: “I don’t know how the Austin WordPress Meetup folks knew that WP-CLI wants the post_name field to be referred to as pagename, but mad props to those folks for helping me out today.”

Well, the clue was there, I just didn’t catch it. The WP-CLI doc for wp post list says that one of the flags is for “One or more args to pass to WP_Query”.

Duh.

Continue reading “Two embarrassing things I did not get about WP-CLI at first”

enforcing web site config with scripting & automation

Last fall I attended the All Things Open conference in Raleigh NC. One of the talks I saw was about Chef, which is a scripting language for server admins to keep systems – in this case typically Linux servers – set up and configured correctly, and to clone systems easily.

My big take away from that talk was the concept of setting policies for a system and using the scripts to enforce the policies. So for example, you could have a policy that all of your Linux servers have to have php 5.5 installed in a particular location. You can write a Chef ‘recipe’ to check that and fix it if something happens to it.

Continue reading “enforcing web site config with scripting & automation”

wp-cli recipe for deploying a static home page with custom template and feature image

On our site we have a static home page that uses a page template and needs to have a feature image set for it. Setting this up manually is tedious when you multiply by five instances (and have several other manual things to do).

The home page is fully set up in our demo instance, so that gave me a template to work from.

To start, I used a mySQL query to get the row in the posts table for the home page post in the demo instance. I use this to create a mySQL INSERT statement so when run, it will insert the post into another instance. I stored this in a file.

Continue reading “wp-cli recipe for deploying a static home page with custom template and feature image”