-
-
Notifications
You must be signed in to change notification settings - Fork 33
Installation
Andy Fragen edited this page Nov 20, 2021
·
13 revisions
WP Dependency Installer v2.0.0 or greater now requires PHP 5.6 or greater and WordPress 5.1 or greater.
You can use composer to install this package within your WordPress plugin / theme.
- Within your plugin or theme root folder, run the following command:
composer require afragen/wp-dependency-installer
- Then create a sample
wp-dependencies.json
file
[
{
"name": "Git Updater",
"host": "github",
"slug": "git-updater/git-updater.php",
"uri": "afragen/git-updater",
"branch": "develop",
"required": true,
"token": null
},
{
"name": "Query Monitor",
"host": "wordpress",
"slug": "query-monitor/query-monitor.php",
"uri": "https://wordpress.org/plugins/query-monitor/",
"optional": true
},
{
"name": "Local Development",
"host": "WordPress",
"slug": "local-development/local-development.php",
"uri": "https://wordpress.org/plugins/local-development/",
"required": true
}
]
include_once( __DIR__ . '/vendor/autoload.php' );
WP_Dependency_Installer::instance( __DIR__ )->run();
You will then need to update wp-dependencies.json
to suit your requirements.
That's it, happy blogging!