-
Notifications
You must be signed in to change notification settings - Fork 0
Adding themes and plugins
Wpackagist is used install plugins and themes. The exact names of the plugins for wpackagist are found at their website.
To install plugins, use composer require wpackagist-plugin/[plugin-name]
To install themes, use composer require wpackagist-theme/[theme-name]
Premium themes and plugins are a little bit more complicated to install. You need to define the repository yourself in your composer.json like this. I would recommend to declare yourself as the vendor to more easily recognize the premium plugins:
{
"type": "package",
"package": {
"name": "[vendor]/[plugin/theme-name]",
"type": "wordpress-[plugin/theme]",
"version": "[version]",
"dist": {
"type": "zip",
"url": "[location of the zip file, accessible via the internet]"
},
"require": {
"composer/installers": "v1.0.7"
}
}
}
]
You can then install the dependency by requiring it like this: composer require [vendor]/[plugin/theme-name]
.
These can be installed like you're used to, but they should be in the "public/wp-content/[plugins/themes]"-folder, where composer also installs your plugins. Just make sure you include the folder in your git by specifying !public/wp-content/[plugins/themes]/[name]
at the end of your .htaccess.