WordPress plugin in PhpStorm 10

I needed to create a new plugin for WordPress, so I decided to take advantage of the JetBrains Toolbox license I have and use a PHP IDE called PhpStorm. The support for WordPress is supposed to be great, with coding assistance specific to WordPress. Setting things up took a bit of figuring out so I’m going to document the steps.

Note: This might not be any different than it was in PhpStorm 8 or 9.

In my examples I’m using MAMP as my Web Server and PHP.

  1. First we start PhpStorm and click “Create New Project”


  1. Next, we give the plugin a name and enter the WordPress installation path. Click “Create”.


  1. We are presented with the main IDE of PhpStorm.


  1. In the status section (click the bottom-right corner to bring it up if it’s not up), click the links to enable WordPress code style and WordPress installation.


  1. If no Interpreters are listed here then you may need to add the reference to one by clicking the ellipsis button next to the dropdown and summoning the dialog box shown below. The screenshot shows an example of a path to the PHP that comes with MAMP.


  1. In Preferences | Build, Execution, Deployment | Deployment, add a “web server” by clicking the + sign. Enter a name and specify its type as “local or mounted folder” so that PhpStorm can upload files into the plugin folder easily.


  1. Now, in the “Connection” tab, specify the WordPress folder as the “Upload/Download project files” folder (this is the directory that PhpStorm will treat as the project root when deploying). Specify the Web server root URL if you have your web server accessible at some URL. In the case of MAMP it would be http://localhost:8888.


  1. Next, in the “Mappings” tab, enter for Deployment path on server the value of “wp-content/plugins/<project-name>”. This means that when you choose to “deploy” this project, its files will be placed in this folder. After all, we are creating a WordPress plugin. Click “OK”.


  1. Back in the main IDE, there should now be an “Upload to <web server name>” item in the Tools | Deployment menu. Click it, and this should “upload” the files to the plugin directory of your local WordPress installation.


  1. Now enter the WordPress Admin and go to Plugins. Now you see the plugin here!



  • Rustem Zakiev

    Ok. But how to debug plugin. After every code editing I need to deploy files to local WordPress folder? Is there a way for realtime development?