| title | Installing HWP Toolkit Plugins with Composer |
|---|---|
| description | A guide on how to install any HWP Toolkit plugin using Composer, which is the recommended way for modern WordPress development workflows. |
You can install any HWP Toolkit plugin using Composer, which is the recommended way for modern WordPress development workflows.
You can also install them manually from our Releases page.
- Composer 1.x or 2.x
- WordPress 6.0+
- PHP 7.4+
Note
WPGraphQL Logging Plugin requires PHP 8.1.2 in order to work.
- wpengine/hwp-previews
- wpengine/wpgraphql-webhooks
- wpengine/wpgraphql-debug-extensions
- wpengine/wpgraphql-logging
Copy and use this example as your composer.json for a typical WordPress project using HWP Toolkit plugins:
{
"name": "wpengine/headless-wordpress-toolkit-composer-test",
"description": "Headless WordPress Toolkit Composer Test",
"repositories": [
{
"type": "composer",
"url": "https://raw.githubusercontent.com/wpengine/hwptoolkit/main/plugins/composer-packages.json"
}
],
"require": {
"wpengine/hwp-previews": "*",
"wpengine/wpgraphql-webhooks": "*",
"wpengine/wpgraphql-debug-extensions": "*",
"wpengine/wpgraphql-logging": "*"
},
"config": {
"allow-plugins": {
"composer/installers": true
}
}
}-
Copy the above JSON into your project's
composer.jsonfile. -
Install dependencies:
composer install
-
Activate the plugin(s) in WordPress
Go to the WordPress admin and activate the plugin(s) as usual.
To update to the latest version:
composer update wpengine/hwp-previews wpengine/wpgraphql-webhooks wpengine/wpgraphql-debug-extensions wpengine/wpgraphql-logging- If you see an error about missing
composer/installers, runcomposer require composer/installers. - If the plugin does not appear in your plugins list, check your
installer-pathsand that you are in the correct WordPress directory. - Ensure the
repositoriessection is present and correct in yourcomposer.json.
If you feel like something is missing or you want to add documentation, we encourage you to contribute! Please check out our Contributing Guide for more details.