Genesis Skeleton for WordPress: Rapidly Create, Develop, and Deploy Across Multiple Environments

Last week we featured a collection of Vagrant resources for WordPress development. Eric Clemmons, one of our readers, commented to let us know about Genesis Skeleton for WordPress, an awesome project that uses Vagrant for creating, developing and deploying WordPress across multiple environments.

When Clemmons created Genesis, he wasn’t aware of how easily the name might be confused with the Genesis theme from StudioPress, so he’s updating the project to be called “Genesis Skeleton for WordPress.” The project utilizes NodeJS, Vagrant and VirtualBox. For scaffolding and development, it relies on Yeoman, Bower, Genesis WordPress Generator, and Vagrant Host Manager. Deployment is handled by Capistrano and Ansible. This setup allows for the following:

  • Generate a functional WordPress site + server
  • First-class local development
  • Independently stage features for review
  • Use production data when developing
  • High-performance, zero-configuration caching out of the box
  • Easily monitor remote server errors
  • Instant, secure SSH access
  • Automated server provisioning
  • Consistent, reliable environments

Here’s a quick demo:

genesis

Clemmons and his colleagues use Genesis at Consumer Media Network to make it easier to develop, test, stage, and deploy a robust WordPress site. “The project has been re-invented over the past 2 years,” Clemmons said. “Once Yeoman and Ansible gained more traction, I was ready to re-tool it into what it is today.”

What makes the Genesis Skeleton for WordPress unique?

The Genesis project was specifically created to allow the developers at CMN to follow the best practices set for all of their other projects, including non-WordPress projects using Symfony or Node. Clemmons outlined those practices and how they are integrated into Genesis:

  • Local development should be within a Vagrant VM to keep the client OS pristine.
  • All environments (local/staging/production) should share the exact same machine setup (i.e. provisioning) to minimize environmental errors when deploying.
  • Utilize the best-in-class tools suited for individual tasks: Vagrant for local development, Yeoman for scaffolding, WordPress for the CMS, Ansible for provisioning, Capistrano for deployment.
  • Draw a firm line in the sand regarding what Genesis Skeleton won’t do. (e.g. installing themes, plugins)
  • Encourage performance via Apache optimization and Varnish, vs. relying on the application layer (e.g. WordPress Plugins) to do the server’s job.
  • Support for staging/previewing branches. (e.g. http://my-new-feature.staging.mysite.com)

While the first incarnation of the Genesis skeleton used a wrapper script, the latest version requires the developer to have a better understanding of his tools. “I intentionally avoided ‘do-it-all’ wrapper scripts, because the developer becomes reliant on Genesis Skeleton, not the underlying tools powering their project,” Clemmons said. He’s started several “Genesis Skeletons” for various technologies they use for scaffolding projects at CMN. The Angular and WordPress skeletons have both been open source for the past year.

Genesis Skeleton Provides a Consistent Workflow and Better Collaboration

Because Clemmons and his team have dozens of WordPress sites, he wanted them to have a consistent workflow across all projects, no matter what the complexity:

  1. git clone …
  2. bower install
  3. vagrant up
  4. cap production genesis:down
  5. open http://local.reponame.com/
  6. cap production deploy

This streamlined workflow allows his team to collaborate on projects more efficiently. “We’ve been able to have a half-dozen people openly collaborating, committing, and deploying the same WordPress site within a day,” Clemmons said. The Genesis Skeleton has revolutionized the way they work together:

Whereas, in the past, a single developer was in charge of everything and was responsible for FTP’ing (ugh!) the code to production, and subsequently committing and pushing to Github afterwards. (Hopefully they remembered that part!)

Now, Github is our ‘single source of truth’ for what gets deployed, and our sites have vastly improved in terms of reliability, quality, and speed.

From the outside, the Skeleton may seem like a fancy excuse to use all the newest development tools available, but Clemmons reports that changing their workflow greatly increased the team’s productivity. “The best thing that Genesis Skeleton for WordPress has done for us is to allow all members of our technology team (from systems, to frontend, to backend) to actively collaborate and work on a site,” he said. “The productivity gains have been astounding!”

Open Sourcing the Genesis Skeleton for WordPress

genesis-skeleton

The Genesis skeleton is now a fairly well-supported and well-documented open source project on github. Clemmons said the project grew out of their own need across dozens of sites and a previous project he began two years ago. “Once I completed the latest iteration’s prototype, we battle-tested in production,” he said. “The entire team worked to solidify the project with regards to performance, workflow, and edge-cases specific to WordPress.”

When asked why he decided to open source the skeleton, Clemmons said that he hopes the community will be able to benefit from the project. “I usually despise working with WordPress, as do many others, not because it’s a terrible framework, but because the development/deployment workflow is generally terrible and out-dated,” he said. “Because this is a problem that wasn’t solved at my place of business (and was marginally solved by moving hosting to a PaaS), I wanted to share the progress with the community at large.”

Clemmons has always believed in open sourcing tools wherever possible. He also encourages the activity with his colleagues. When his team is active in building something for work, they try to open source the parts not specific to the business model. As a result, Clemmons has seen an impressive amount of involvement with the project. “Key individuals have been essential to improving performance and resolving bugs, so clearly open-sourcing it was the right move.”

If you want to incorporate modern development tools into your WordPress projects, Genesis is a solid option for getting started. Whether you’re one person working alone or collaborating with a large team, Genesis makes it easy to create a consistent development and deployment workflow across all environments. Check out the Genesis Skeleton for WordPress on Github.

There are 9 comments

Comments are closed.