Install everything with Composer
One composer.json for Easy SVG from wpackagist and Easy SVG Pro from composer.unleash-wp.com, the key from the environment, the license from wp-config.php.
The free plugin comes from wordpress.org through wpackagist, Pro from composer.unleash-wp.com with your license key as the password. Background and troubleshooting: Install with Composer.
1. composer.json
{
"repositories": [
{
"type": "composer",
"url": "https://wpackagist.org",
"only": ["wpackagist-plugin/*", "wpackagist-theme/*"]
},
{
"type": "composer",
"url": "https://composer.unleash-wp.com",
"only": ["unleashwp/*"]
}
],
"require": {
"composer/installers": "^2.0",
"wpackagist-plugin/easy-svg": "^5.3.1",
"unleashwp/easy-svg-pro": "^1.0"
},
"config": {
"allow-plugins": {
"composer/installers": true
}
}
}
onlykeeps each repository to its own packages, so no other source can answer forunleashwp/*.- Both plugins land in
wp-content/plugins/easy-svg/andwp-content/plugins/easy-svg-pro/. In Bedrock, theinstaller-pathsyou already have send them toweb/app/plugins/. - Keep the free plugin at
^5.3.1. Pro needs that version; an older one installs fine but Pro stays inactive.
2. The key for Composer
composer config --global --auth http-basic.composer.unleash-wp.com unleashwp YOUR_LICENSE_KEY
export COMPOSER_AUTH='{"http-basic":{"composer.unleash-wp.com":{"username":"unleashwp","password":"'"$UNLEASHWP_LICENSE_KEY"'"}}}'
composer install --no-dev --no-interaction --prefer-dist
UNLEASHWP_LICENSE_KEY is a secret in your CI system. wpackagist needs no key.
3. The license in wp-config.php
define( 'EASY_SVG_PRO_LICENSE_KEY', getenv( 'EASY_SVG_PRO_LICENSE_KEY' ) );
define( 'DISALLOW_FILE_MODS', true ); // Composer is the only source of plugin files.
Set EASY_SVG_PRO_LICENSE_KEY on the server (hosting panel, .env, deploy tool).
4. Install, activate, switch on
composer install
wp plugin activate easy-svg easy-svg-pro
Then open wp-admin once as an administrator. That request activates the license and uses one seat. A deploy script alone cannot do it, because the activation runs only for a signed-in administrator.
Switch the features on for this site with one command:
wp option update easy_svg_settings '{"svg_upload":true,"icons":true,"max_mb":2}' --format=json
wp option update easy_svg_pro_features '{"collections":true,"editor":true,"sources":true,"cli":true}' --format=json
Every key you leave out is off. To enforce the same switches on every site, use Global settings with per-site overrides instead.
When it worked
composer installlistswpackagist-plugin/easy-svgandunleashwp/easy-svg-pro.- Icons → License says "This site is activated. The Pro features are on."
- Icons → Features shows your switches on.
Pitfalls
wp option update lines replace the whole option. Run them before anyone has changed settings by hand, or include every key you want to keep.