Using Composer with The Events Calendar
Any of our premium plugins work with Composer, allowing developers to install and manage them as dependencies in a development environment. This is a convenient way to develop locally by integrating the plugin repositories into your site’s repository without directly adding it to your project. It also makes plugin updates easier to manage and install as you develop.
In order to do this, you’ll need to generate a composer.json file for our plugins at the root of your project. This file contains variables that tell Composer what to install and details about what’s being installed. Let’s walk through what that file needs in it for Composer to fetch, install, and manage the plugin repositories in your own project.
Tools We Will Use
- Composer: Installs our premium plugins as project dependencies and keeps them on the version you choose. The example below uses Composer 2.2 or later.
- composer/installers: Puts each plugin in your WordPress plugins folder instead of
vendor/. - Your unified license key (
LWSW-XXXX-XXXX-XXXX-XXXX-XXXX): Lets you download every premium plugin. - The premium plugins you want to install: See the slug table below.
Instructions
Build the download URL
Each premium plugin downloads from a URL in this format:
https://herald.nexcess.com/download/{plugin-slug}/{version}/{license-key}/zip
Replace each variable with your own values:
|
Variable |
What to enter |
|---|---|
|
|
The slug of the plugin you want to download. See Plugin slugs below. |
|
|
A specific version, such as |
|
|
Your unified license key ( |
Your license key is the same for every plugin, so the only thing that changes from one plugin to the next is {plugin-slug}.
|
Plugin |
{plugin-slug} |
|---|---|
|
Events Calendar Pro |
|
|
Event Tickets Plus |
|
|
Community Events |
|
|
Eventbrite Tickets |
|
|
Filter Bar |
|
|
Event Schedule Manager |
|
For example, this URL downloads the latest version of Event Tickets Plus:
https://herald.nexcess.com/download/event-tickets-plus/latest/LWSW-XXXX-XXXX-XXXX-XXXX-XXXX/zip
Using an older composer.json? If yours still uses evnt.is/fetch-* URLs, replace each dist URL with the new format above.
composer.json file example
Create a composer.json file at the root of your project. This example installs Events Calendar Pro 7.8.6:
{
"repositories": [
{
"type": "package",
"package": {
"name": "the-events-calendar/events-calendar-pro",
"version": "7.8.6",
"type": "wordpress-plugin",
"dist": {
"type": "zip",
"url": "https://herald.nexcess.com/download/events-calendar-pro/7.8.6/LWSW-XXXX-XXXX-XXXX-XXXX-XXXX/zip"
}
}
}
],
"require": {
"composer/installers": "^2.0",
"the-events-calendar/events-calendar-pro": "7.8.6"
},
"extra": {
"installer-paths": {
"plugins/{$name}/": ["type:wordpress-plugin"]
}
},
"config": {
"allow-plugins": {
"composer/installers": true
}
}
}