How to set up a local WordPress Vagrant development environment

Setting up a Vagrant box can be painstaking. Here is the process: Install a basic box. SSH into said box. Run a command. If it works, add the command to a provision file. Destroy your box. Run the box again and see if the command works via a provisioning file too. Whether it works, or doesn’t work, back to step 2 and try a new command or try the same command another way – depending of if it worked or not.

Continue reading...

It’s broke: how do I fix it? Debugging your code in WordPress

I had the great honor of speaking at WPNYC this past week. I promised to publish my slides. I also wrote a post about the Tools of the Trade slides.

Continue reading...

Is npm not installing properly on Vagrant running on Windows?

Get a Mac! Kidding. (I actually think Microsoft has been more innovative lately.) Run the flag –no-bin-links when you install anything with npm and it will fix your issue. I have a dev Vagrant that I share with my team. I tend to mock things up when I’m playing around at home in the evenings. I work on a Mac at home. So when I confidently came into work with the plan to set up a box for my team to work on, I lost a bunch of time trying to figure out why the npm development tools I wanted, would not install.

Continue reading...

How to Globally Ignore files from git

TLDR; nano ~/.gitignore git config –global core.excludesfile ‘~/.gitignore’ Background Git is all the rage, why wouldn’t it be? You can save every iteration of your work; it’s the persistent undo button for developers. Seriously, if you’re not using it, start now. Find a tutorial, stop everything you’re doing and get on that. It will make your work 1000% more efficient. One issue I came across with my workflow is that my Mac, like everyone else’s, places a .

Continue reading...

How to Back up Your Database on Vagrant Halt

I’ve been exploring Vagrant lately. At work we need a better development workflow, and at home I’ve been reaping the benefits as well. One of the nice aspects of Vagrant is the ephemeral nature it gives to your environment. You can spin up a development box quickly and easily with a single command vagrant up when you’re not working you can halt the virtual machine with vagrant halt and when you’re not working on the project you can destroy the virtual machine and clear up your resources with vagrant destroy.

Continue reading...