JetBrains PhpStorm – The Smart IDE for WordPress Development

  Introduction
If you are developing WordPress themes or plugins we have a must-try IDE for you - PhpStorm from JetBrains. Let’s look at specific features wordpress developers can use in order to increase their productivity.
WP Mayor’s work is supported by its audience. If you purchase through a link on our website, we may earn a commission. Here’s why you can trust us.
Table of contents

If you are developing WordPress themes or plugins we have a must-try IDE for you – PhpStorm from JetBrains. Let’s look at specific features wordpress developers can use in order to increase their productivity.

PhpStorm is a cross-platform, lightweight and smart PHP IDE that deeply understands your code, provides smart code completion, quick navigation, on-the-fly error checking, unit-tests running, visual debugging and much more. However, it’s not only about PHP – you can work with HTML, JS, CSS and many other technologies easily without changing the environment you work at. There are a lot of features saving your time and energy – feel free to check at features page.

When it comes to WordPress plugins or themes development it’s extremely important to have intelligent tools in order to make development fast and painless. You can start using PhpStorm for WordPress just out-of-the box: it understands PHP by default and you just need to create a project from the directory, FTP or version control system (such as Subversion, Mercurial, Git, Perforce, CVS, TFS) – WordPress classes/functions will be loaded and hinted for you.

DOWNLOAD JetBrains PhpStorm IDE

PhpStorm comes with cool built-in color coding scheme, however, if you want to change it just edit settings (File | Settings | Editor | Colors & Fonts) or check other themes here. IDE appearance can be adjusted in settings as well. There are also a lot of plugins in the repository you can easily download and use.

In order to understand how to work with IDE check online help.

Everything in PhpStorm is done within a project so that you can configure different projects corresponding to your needs. WordPress code hinting and code completion works from the very moment you have wp-includes folder in your project.

In order to make your work with IDE more productive check Keymap Reference and get acquainted with all the hotkeys you can use. All the hotkeys in PhpStorm Keymap can be changed at File | Settings | Keymap. For instance select the function you’re working with and press Ctrl+Alt+B (Cmd+B) in order to go to implementation. Hotkeys help you to navigate and act faster without using a mouse.

For WordPress developers PhpStorm can be completed with WordPress-specific features:

1. Add WordPress CodeStyle using this guide – your code will meet WordPress Coding Standards (Works for PhpStorm 5 too)

2. Use wpdb in order to expand WordPress properties in PhpStorm. This option will make work with built-in variables easier.

Check this screencast in order to get information about WordPress development in PhpStorm.

Debugging WordPress with PhpStorm

PhpStorm provides numerous options for debugging your PHP and WordPress code out-of-the-box, so you can:

  • Inspect context-relevant local variables and user-defined watches, including arrays and complex objects, and edit values on the fly;
  • Setup remote debugging for your server;
  • Evaluate an expression in runtime;
  • Debug a page in multiple sessions simultaneously;
  • Keep a debugging session alive while moving between pages.

You can use our browser bookmarklets, Zend Toolbar or XDebug toolbar to initiate debugging directly from any page in a browser.

For instance, one of the easiest way to begin WordPress debugging with PhpStorm is using Xdebug (so you should have a web server with correctly installed Xdebug. Don’t forget to set the xdebug.remote_enable setting to 1. You can validate your installation using checker from xdebug.org). In order to prepare PhpStorm for listening just ‘Toggle the ‘PHP Listen debug connections’ button. After that you can set a breakpoint in your code.

In order to activate the debugger on the server you need to set the special GET/POST or COOKIE parameter. You can do it manually, but it is much more convenient to use one of the special tools such as browser toolbars or bookmarklets for that.

Try our bookmarklets generator and get bookmarklets which will work in any modern browser and allow you to start/stop a debugging session by controlling the Xdebug cookie.

Start a debug session in browser and reload the page. Switch to PhpStorm and set the initial path mappings by selecting the path to the local copy of the script that we are debugging. These paths are similar if you are editing files directly on the server.

On reaching the breakpoint the debugger suspends. Debug with pleasure!

In order to get familiar with Debug and Testing in PhpStorm check these links:

DOWNLOAD JetBrains PhpStorm IDE

Jean Galea
Jean Galea
Jean Galea is an investor, entrepreneur, and blogger. He is the founder of WP Mayor, the plugins WP RSS Aggregator and Spotlight, as well as the Mastermind.fm podcast. His personal blog can be found at jeangalea.com.
Jean Galea
Jean Galea
Jean Galea is an investor, entrepreneur, and blogger. He is the founder of WP Mayor, the plugins WP RSS Aggregator and Spotlight, as well as the Mastermind.fm podcast. His personal blog can be found at jeangalea.com.
PeachPay for WooCommece

An all-in-one checkout and payment solution for WooCommerce . See your store's sales increase by 35%!

4 Months FREE with WP Engine

4 months free on all shared managed WordPress and eCommerce hosting plans. Offer ends on 12/01/2022.

Expand your toolset with expertly verified solutions delivered to your inbox every week.
Join thousands of designers, developers, and marketers who trust our experts to find and test the best tools for their WordPress sites.
By signing up to our newsletter, you agree to receive electronic communications from WP Mayor that may include advertisements.
Expand your toolset with expertly verified solutions delivered to your inbox every week.
Join thousands of designers, developers, and marketers who trust our experts to find and test the best tools for their WordPress sites.​
By signing up to our newsletter, you agree to receive electronic communications from WP Mayor that may include advertisements.

Leave a Reply

Your email address will not be published. Required fields are marked *

From web hosting to WooCommerce plugins and backup services, we have put together a collection of exclusive coupons and deals just for you.
WP Mayor_Icon_white
2022 Reader Survey