If you want to install Relevanssi Premium as a Composer package, you can use the following URL to fetch the latest version:
https://www.relevanssi.com/update/fetch_latest_version.php?api_key=XXX
Replace XXX with your valid API key. The URL will always return the latest version of the plugin files. If you want a specific version, you can use the following:
https://www.relevanssi.com/update/get_version.php?api_key=XXX&version=2.20.1
The Composer package should look something like this:
{
"type": "package",
"package": {
"name": "relevanssi/relevanssi-premium",
"version": "2.20.1",
"type": "wordpress-plugin",
"dist": {
"type": "zip",
"url": "https://www.relevanssi.com/update/get_version.php?api_key=XXX&version=2.20.1"
},
}
}WP CLI also supports installing plugins from URLs. You can do this to install Relevanssi Premium:
wp plugin install https://www.relevanssi.com/update/fetch_latest_version.php?api_key=XXX
Both URLs support HTTP basic auth. If you don’t include the api_key parameter, you’ll be prompted for your user name and password. Use your Relevanssi.com account user name (not the login email) as the user name and your API key as the password. These can be stored in auth.json, so you can commit your composer.json without your API key leaking.
2 Comments. Leave new
Well, you can use the https://www.relevanssi.com/update/fetch_latest_version.php?api_key=XXX URL to always get the latest version. I wonder if that combined with “version: *” would do the trick? I don’t use Composer for plugins myself, so I don’t know all the tricks that well.
Hello!
This is great that I can install Relevanssi Premium via Composer. However, it would be much better if this were a packagist type install so I did not have to manually update the version number in the composer.json. This makes it almost the same as updating the entire plugin manually.
Is there a less manual way to keep the plugin updated to the latest version?
Thanks.