Installing Gravity Wiz plugins with Composer
If you have a Pro license for any of our paid plugin suites, Composer is supported for installing our plugins as dependencies. If you’re familiar with WPackagist, the setup is similar. Follow the instructions below to get started.
Composer access is suite-specific. You’ll need a Pro license for each suite. For example, if you have a Pro Gravity Connect license, that doesn’t automatically grant you Composer access to Gravity Perks.
Install Composer
If you don’t already have Composer installed on your system, follow the official installation steps.
Initialize your project
Open a command line, navigate to the root folder of your site, and run the following command:
composer init
It will ask questions about your project to generate Composer’s configuration file composer.json
. Below is an example of how you could answer those questions:
Package name (<vendor>/<name>): ollivanders/magical-wordpress-site
Description []: My WordPress Wand Shop
Author: [Dave Smiff <your@email.com>, n to skip]: n
Minimum Stability []: // leave empty if not specified
Package Type []: // leave empty if not specified
License []: // leave empty if not specified
Would you like to define your dependencies (require) interactively [yes]? n
Would you like to define your dev dependencies (require-dev) interactively [yes]? n
Add PSR-4 autoload mapping? Maps namespace to the entered relative path. [src/, n to skip]: n
Do you confirm generation [yes]? yes
You are now ready to set up your repositories.
Setup
Follow the steps below to set up our composer repository.
Note: You will need to replace [LICENSE_KEY(S)]
with your suite’s license key, and [REGISTERED_SITE]
with your registered site’s URL. You can manage your registered sites on the Licenses tab in your account, under the Manage Sites link.
If you have license keys for multiple suites, you can enter them all, separated by the pipe symbol |
. For example: gplicense|gclicense|gspclicense
- Open a command line and set up authentication by entering the following:
composer config -g http-basic.gravitywiz.com "[LICENSE_KEY(S)]" "[REGISTERED_SITE]"
- Add the repository with this command:
composer config repositories.gravitywiz composer https://gravitywiz.com/composer
- Install plugins using:
composer require gravitywiz/[PLUGIN_NAME]
List available packages
Composer expects you to know the package name when installing packages. Use the following command to list all available packages from our repository.
composer show -all "gravitywiz/*"
Sample file
Let’s look at a sample composer.json
to see the whole setup.
composer.json
{
"name": "ollivanders/magical-wordpress-site",
"description": "My WordPress Wand Shop",
"require": {
"gravitywiz/gwreadonly": "^1.9",
"gravitywiz/gp-populate-anything": "^2.1"
},
"repositories": {
"gravitywiz": {
"type": "composer",
"url": "https://gravitywiz.com/composer"
}
},
"config": {
"allow-plugins": {
"composer/installers": true
}
}
}
Syncing development sites and deploying
Composer tracks all changes in the composer.lock
file. Composer will use that file to recreate the same setup on any device. Simply drop the file into your site’s directory and run the following command to rebuild the dependencies.
composer install
Updating plugins
When plugins need to be updated, composer will follow the version restrictions set in composer.json
. To update to the latest versions within those restrictions, run the following command.
composer update
This will also update composer.lock
, allowing you to test the changes locally before deploying.
FAQ
Why is Spellbook automatically installed alongside my required dependencies?
Spellbook is required for license management. It also contains shared code that the plugins depend on.
Why does Composer access require a Pro license?
Composer is reserved for Pro licenses because its design inherently supports workflows that benefit most from unlimited site activations, which are a key feature of our Pro tiers. Composer allows developers to automate plugin installations and updates via the command line, outside the WordPress admin UI—ideal for teams managing multiple environments (e.g., staging, production, CI/CD).
Since Basic and Advanced licenses have limited site activations, providing Composer access would make it difficult to enforce those limits. Composer does not natively restrict usage by activation count, making it incompatible with limited-license models without additional enforcement mechanisms.
Is there a technical limitation preventing Basic/Advanced licenses from using Composer?
Yes, in practice—though not strictly in theory.
Composer clients fetch plugin packages via URLs authenticated using license keys or tokens. Once authenticated, Composer doesn’t natively enforce per-site limits. This means that:
- A user could configure Composer once and download the plugin multiple times without further checks.
- Tracking downloads back to specific sites becomes ambiguous (especially if users spoof or reuse site URLs).
This creates a technical enforcement gap for limited licenses, making Composer better suited for licenses without such constraints—hence, Pro only.