Documentation

Installing via Composer

All of our premium plugins and addons can be installed using Composer, similar to how our free plugins can be installed using WordPress Packagist.

Generate API Credentials

Visit My Account and navigate to the Settings tab to generate a Composer API username and password. API keys are license independent and will grant access to all plugins that you have an active subscription for.

The username and password are used by Composer to authenticate to our API with HTTP basic authentication.

Add Our Repository

Add our repository to your composer.json file, remembering to substitute your Composer API key:

"repositories": [
    {
        "type":"composer",
        "url":"https://composer.deliciousbrains.com"
    }
]

We recommend creating an auth.json file alongside the composer.json file to pass the authentication key and secret:

{
    "http-basic": {
        "composer.deliciousbrains.com": {
            "username": "{COMPOSER_API_USERNAME}",
            "password": "{COMPOSER_API_PASSWORD}"
        }
    }
}

This way you can keep the auth.json file out of your version control system, keeping the username and password safe. Just make sure you create the file on your live server when you come to deploy.

We provide you with the content of both json files with your credentials pre-populated in the settings screen:

Composer auth.json new UI

Add Desired Plugins

From the CLI, require your desired plugins.

WP Migrate DB Pro

composer require deliciousbrains-plugin/wp-migrate-db-pro

Media Files

composer require deliciousbrains-plugin/wp-migrate-db-pro-media-files

Theme & Plugin Files

composer require deliciousbrains-plugin/wp-migrate-db-pro-theme-plugin-files

CLI

composer require deliciousbrains-plugin/wp-migrate-db-pro-cli

Multisite Tools

composer require deliciousbrains-plugin/wp-migrate-db-pro-multisite-tools

Version Constraints

You can use any Composer version constraints, or specify the exact version of a plugin or addon:

"require": {
    "deliciousbrains-plugin/wp-migrate-db-pro": "1.8.1"
}

Customizing Install Locations

We use composer/installers to automatically install our packages to wp-content/plugins/. However, you can customize the install location by adding the following to your composer.json file:

"extra": {
    "installer-paths": {
        "public_html/wp-content/plugins/{$name}/": ["type:wordpress-plugin"]
    }
}

Example composer.json

{
    "name": "deliciousbrains/composer-test.dev",
    "description": "WP Migrate DB Pro for WordPress site",
    "repositories": [
        {
            "type":"composer",
            "url":"https://composer.deliciousbrains.com"
        }
    ],
    "require": {
        "deliciousbrains-plugin/wp-migrate-db-pro": "^1.8",
        "deliciousbrains-plugin/wp-migrate-db-pro-cli": "^1.3"
    }
}

Troubleshooting

If you are having issues with HTTP 400 Bad Request responses when running Composer commands, then you will need to update Composer on your machine with composer self-update.

If you are using Roots Trellis for deployments then you can make use of the Composer HTTP Basic Authentication feature supported by your Ansible vault.