wpdocker: A Local WordPress Development Stack in Docker

I have been using VVV as my local development environment for quite some time, and while it’s an awesome tool, I’ve been itching to try something a little lighter weight, and to have the ability to tailor it a little more to my own workflow. I have been intrigued by Docker ever since it started gaining popularity, and I finally found the time to start playing with it.

wpdocker is the result of my experimentation in building a local WordPress development stack in Docker. It’s not only a set of Docker containers which make up the local environment, but also a couple of Bash scripts which handle things like starting and stopping the stack, creating and deleting WordPress installs, updating the host system’s hosts file, and running WP-CLI commands.

I started using this as my primary development environment this week, moving over all my local WordPress installs from VVV. While there are still some rough edges, it has been stable, and I’m going to be using it as my local development environment full-time going forward.

Check it out at https://github.com/philipnewcomer/wpdocker.

Keep in mind that this is very much a beta release; this has not been extensively tested and there are still some rough edges. However, it is usable, and I look forward to improving it over time.

Tip: Make IE9 Use Standards Mode When Developing Locally

Recently I was testing out browser compatibility on a WordPress theme which I’m building. Since I do my development on a Mac, I was running Windows in a virtual machine. I have a web server installed locally on my Mac, which I can access from my windows VM. The problem was that Internet Explorer 9 kept insisting on rendering the site in IE7 compatibility view mode. I could use IE9’s developer tools to switch the rendering mode back to IE9, but whenever I would close the browser and reopen it, the page would be in rendered in IE7 mode again. And I’m using a valid HTML5 doctype, so I knew that wasn’t the cause of the problem. Continue reading