My Development Workflow

I recently joined Carrie Dils for an Office Hours discussion about workflows. Once the podcast is live I’ll include a link, but here’s a quick summary of what we discussed.

Themes

I have two starter themes: EA Starter, a heavily-modified, underscores-based theme; and EA Genesis Child, a Genesis child theme. Both are structured very similarly. EA Starter uses hooks from Theme Hook Alliance to make it more Genesis-like. I’d say about half my projects are Genesis-based, and the other half are custom WordPress themes.

I use a Core Functionality plugin on all projects, and have a simple mu-plugin on my local install for quick links in the admin bar.

Build Tools

I like to use CodeKit for SASS compiling, JS concatenation and minification, and live refreshing. For projects where you are collaborating with other developers, keeping environments and build processes in sync is more important, and CodeKit might not be a good fit. But as a solo developer it works great for me.

I have been learning to use gulp through my Shared Counts plugin – a collaboration with Jared Atchison. I’ve also been learning webpack and babel in my Gutenberg block development.

Deployment Tools

I use WPEngine as my development environment. For more information, see my post Git Push with WPEngine.

I use WP Migrate DB Pro to push/pull database and media. I use a bash script to trigger push/pulls. For instance, project.sh push runs this:

  1. Pushes code to GitHub.
  2. Pushes code to correct WPEngine remote branch (production or staging), as defined by BE_PUSH_TO in wp-config.php.
  3. Pushes database & media using WP Migrate DB Pro (wp migratedb profile 1).

Since the cli command only accepts profile IDs, I need to make sure I create the profiles in the right order. My initial setup is:

  1. Create a local WP environment (ex: clientname.local )
  2. Create a transferrable install on WPEngine (ex: clientname.wpengine.com )
  3. Make sure WP Migrate DB Pro is installed in both environments and configured to allow push and pull
  4. On local environment, go to Tools > Migrate DB Pro, select “push”, paste in the connection info, check “Media Files”, and save profile (I name it “WPE Push”).
  5. Create a new profile, same settings but for “Pull”. I name it “WPE Pull”.

Larger Sites

When working with large sites, moving media back and forth can be difficult. In these cases I’ll often install BE Media from Production. It updates all (or some) media URLs to use the production URL. On my local install I can just have the themes and plugins installed, but all the images still display correctly.

I drop that plugin file in mu-plugins, then create another mu-plugin called local-settings.php where I specify the production URL. See my post Load Media from Production for more information.

dev-tools development workflow

Receive New Posts by Email

Comments

  1. Hi Bill,

    Thanks for sharing this. As always I really appreciate it and like to read your blogposts.

    When you say half your projects are genesis based, are there technical reasons in that, or is that just depending on the legacy of the project? I sometimes wonder if the need for (of relevance of) using genesis is decreasing by advances in CSS, browser technology and WordPress itself.

    Nowadays it seems that more and more developers that where long time public enthousiasts of the genesis framework don’t use it anymore on their own websites, and perhaps less also in their projects, and I wonder what is behind that. Perhaps also to Rainmaker or not to Rainmaker will be more the choice of the future instead of genesis as a theme framework.

    Can you talk about why you choose for using genesis (or not) nowadays and what remaining value you see in using Genesis now and in how technology is advancing, sometime? That would interest me too.

    Thanks,

    Hans

    1. That’s a great question.

      The main reason I suggest not using Genesis is if there might be a need to create a child theme for a separate site in the future. You’d be surprised how often this happens. For instance, we built a large site for a law firm a year ago and now they want to build practice area specific websites that leverage the existing theme. It only took us a few hours to create a child theme that changes out the logo, base colors, and a custom homepage. Any updates to the main theme get deployed to all sites using it.

      WordPress doesn’t support grandchild themes, and I’ve gone down that path with Genesis and it isn’t pretty. Genesis child theme as network theme, core functionality network plugin, site-specific plugin as “grandchild theme”…

      On some very custom projects I find that I don’t really use any of the Genesis functionality other than the hooks – we end up removing everything and building it custom anyway. If that’s the case, it makes sense to keep the codebase simpler and start with a custom theme.

      Genesis is still a great fit for the simpler sites I build. It provides a lot of great functionality built-in and a great selection of plugins (ex: Genesis Title Toggle) to extend functionality. I especially appreciate the schema filters so that I can easily add the proper schema markup to events, job postings, reviews, and recipes.

      If a client is already using Genesis, I like how we can build a completely new child theme but retain the underlying markup. I’m no SEO expert, but I feel this is less disruptive to their short-term SEO rankings.

      It often comes down to client preference. Some come to me specifically asking for a Genesis-based website, while others specifically want a custom website and won’t talk about building on an existing theme. That’s why I maintain two base themes and keep them as comparable as possible.

  2. Hey Bill,
    thanks for sharing this.

    I also built most of my client projects with Genesis, but sometimes especially when it comes to CSS I am a bit frustrated because there is no support for SASS etc. However I want to give this one a try: https://roots.io/sage/ Have you ever used/tried it and if you have tried it, why don’t you use it? Maybe you can share your view on this one?

    Thanks!

    1. What in Genesis prevents you from using SASS? I use SASS in my Genesis child theme (see here).

      I’ve heard a lot of good things about Sage but haven’t tried it myself. Personally I prefer a leaner starter theme rather than one containing a lot of frameworks (Bootstrap, Foundation, Blade…).

      1. I see your point. Especially for smaller projects a theme setup like Sage is maybe too much.

        You are right, I missed to say that usually I go with the Genesis Child Theme from StudioPress as a basis to start. Maybe it’s time to create my own Child Theme on a Genesis basis or even use yours as a starting point 😉

Leave a comment