Preparing to Use WordPress
IntelliJ IDEA provides a dedicated interface for developing and running WordPress applications and provides WordPress-aware coding assistance, see WordPress Specific Coding Assistance. To get access to this functionality in a project, you need to download WordPress, register it in IntelliJ IDEA, and activated the WordPress integration within the current project.
Alternatively, you can download WordPress and create a stub of a WordPress-targeted project. In this case, the WordPress integration in the project will be activated automatically.
Whether you enable the WordPress integration in an existing project or create a stub of a WordPress application, IntelliJ IDEA checks if the development environment is configured properly for WordPress development. If the configuration does not meet the requirements, IntelliJ IDEA displays a pop-up window with a Fix link.
On this page:
- Before you start
- Downloading and installing WordPress
- Activating the WordPress installation in a project
Before you start
- Make sure the PHP interpreter is configured in IntelliJ IDEA on the PHP page, as described in Enabling PHP Support.
- Make sure the PHP and WordPress Support plugins are installed and enabled. The plugins are not bundled with IntelliJ IDEA, but they can be installed from the JetBrains plugin repository as described in Installing, Updating and Uninstalling Repository Plugins and Enabling and Disabling Plugins. Once enabled, the plugins are available at the IDE level, that is, you can use it in all your IntelliJ IDEA projects.
- Configure the PHP interpreter to use WordPress with, as described Configuring Remote PHP Interpreters. Note that WordPress requires PHP 5.3 or higher.
Downloading and installing WordPress
WordPress.ziparchive at https://wordpress.org/download/.
Extract the archive:
To have the possibility to run your WordPress application on a local Web server,
store the extracted file to the document root of the server where the PHP interpreter is configured.
For local development environment with the Apache HTTPD Web server, extract WordPress.zip to the
- To run your WordPress application on an in-place server, store the extracted file under the project root.
- To run your WordPress application on a remote server, store the extracted files in your project and then configure automatic upload of them to the document root of the remote server.
- If you are not going to run your WordPress application but just need to get coding assistance from IntelliJ IDEA, store the extracted files anywhere on your computer. In this case, you will have to configure the installation as an include path, see Configuring Include Paths.
- To have the possibility to run your WordPress application on a local Web server, store the extracted file to the document root of the server where the PHP interpreter is configured. For local development environment with the Apache HTTPD Web server, extract WordPress.zip to the
To run WordPress in the command line mode, you will need a set of command line tools which you can acquire
by installing the
wp-cli/wp-cli package using the Composer dependency manager or by downloading the
For details, see Using the WordPress Command Line Tool WP-CLI .
Activating the WordPress installation in a project
- Open the Settings / Preferences Dialog by choosing , and click WordPress under Tools.
- On the WordPress page that opens, select the Enable WordPress Integration check box.
In the WordPress Installation Path text box,
specify the folder where WordPress is installed. This folder should contain the
- Click Apply to save the WordPress registration and click PHP.
- On the PHP page that opens, add the path to the WordPress installation folder to the Include Paths list: click the button and specify the path to the installation folder in the dialog box that opens. Learn more in Configuring Include Paths.