Web Development WordPress

WP dev tools I’m stoked about

I’m constantly reading about workflows and new tools, and don’t really get a chance to use them until something fresh comes around (or if I make an extra 5 hrs to try them out). Anyhow, I’ve got some WordPress in the works and wanted to share these excellent finds.

WP-CLI: A command line interface for WordPress

Screen Shot 2014-04-22 at 2.48.43 PM

I’m pretty comfortable with the command line. Not, like, Rails shell savvy, but I can git push and grunt watch fairly competently. Wouldn’t it be awesome to manage WordPress stuff in there too? To update WordPress I’ve been going to whole way to to download it then update manually. How tasking!

(Why couldn’t I do it through the WP Dashboard? Didn’t have the FTP server enabled on my computer, which I just figured out how to do. Still, command line is faster since I’m usually there anyway.)

Enter WP-CLI. It has commands for just about everything from updating WP to installing and activating themes and plugins. You can even create your own commands with PHP classes!

In sum, I love you WordPress but local development can be a pain. Deploying especially. I currently use git, but have to manually transfer the database and replace URLs. Is there a better way? Suggestions, plz!

Roots: Starter Theme


Ah starter themes. I’ve been loyal to Bones thus far, but I’ve stumbled upon a new candidate. Roots is a starter theme built on HTML5 Boilerplate, Bootstrap and Grunt. The main version is not Sass ready, but as is the wonderful web community, Roots made a Sass fork.

The documentation is excellent, there is an active community of users, and even a few Roots-specific plugins (holy moly, Roots Rewrite!).

But I’m mainly excited about the theme wrapper, DRY FTW. How friggin annoying is it to have get_header();, et al. in every single template? And if you ever want to adjust your opening wrapper tags, it’s incredibly tedious. Roots has taken care of it with a base.php that injects the appropriate page template between those tags. Templates now can contain code specific to only that template. Fantastic!