Ideal WordPress Plugin Development Using PhpStorm 8

The upcoming PhpStorm 8 features built-in WordPress support, as explained in this support document. However what’s the best way to set up your WordPress install in order to write plugins? Here’s my personal answer — feel free to suggest alternatives in the comments section.

When working on a WordPress plugin, you don’t want functions, classes, variables, etc. from other plugins to leak into your current plugin through auto-complete or other types of automation. For this reason, I suggest avoiding opening a whole WordPress checkout with all of your plugins inside of it using PhpStorm. At the same time, you don’t want to have a separate copy of WordPress for each plugin that you work on. This is redundant and makes keeping WordPress up to date harder.

So instead do a single checkout of WordPress to its own folder and then define WP_PLUGIN_DIR and WP_PLUGIN_URL, as described on the Codex, so that your plugins folder will live outside of your WordPress folder. This way you can open and index the WordPress folder without getting all of your plugins along with it.

Now create a new project for each individual plugin. When doing so, you’ll want to add the WordPress folder as an include path in PhpStorm, as described in their documentation.

All of this will result in only your individual plugin’s folder showing up in PhpStorm but with WordPress showing up under the “External Libraries” list. This one WordPress install can be used in your browser to test all of your plugins but the plugin codes won’t overlap.

Four (Nearly Five) Years At Automattic

Today marks my official fourth anniversary at Automattic of being a proper full-time employee! In reality I started working for Automattic in about July of 2009 but due to an oversight, most of my coworkers thought I was already hired on as a normal employee. Meanwhile I just kept submitting my monthly contract report. Our hiring process has thankfully changed quite a bit since then!

Four years is a big milestone at Automattic as that is when you get your really cool custom WordPress MacBook. Unfortunately for me I’m one of the handful of Windows users at Automattic so it doesn’t make a ton of sense to get a MacBook just to run Windows on it. Oh well. :)

Working at Automattic really has been a dream come true for me. Besides getting to work on something I’m passionate about, WordPress, I also get to work with some of the most amazing people. I’ve made some life-long friendships here that I truly cherish. I can’t speak highly enough of the company and my co-workers. And as always, we’re hiring!

I hope my next four (nearly five) years at Automattic are at least half as good as these past ones have been.