PHP Composer
This is optional, and primarily for advanced users.
Be careful about one thing: when using Composer for updating, it will draw out vendor
folder from kirby
folder to install root, and to make everything work properly you will have to upload that new vendor
folder from root too.
It will also draw out some plugin vendor folders, like Commentions and Kirby Robots txt.
Because most Zero One users don't use Composer for updating, we are keeping vendor
folder inside kirby
folder, and also in the plugins folder. Root gitignore
ignores root vendor
folder. If you are using git version control this is important info for you.
We don't suggest using Composer if you are not an experienced user.
From version 2.4.0 Zero One has a bit of enhanced Composer support.
For those who are already friends with Composer, everything will be clear just by looking at composer.json
file in install root.
Also, by overwriting this file on every Zero One update you will always know what version of the Zero One theme you have, and what is the version of some plugins. Unfortunately, not all plugins have Composer support so it is not a complete list.
Zero One PHP Composer for beginners
Why use Composer at all? Well, primarily to update Kirby and plugins easier, and to track their versions. And later when you are comfortable with it, you can use it to add more project dependencies/plugins, just by updating composer.json
file.
Install Composer on your system
Choose an option depending on what your system is https://getcomposer.org/download/ and install it.
Project install
Go to your local install root, run your terminal there, and run the next command
It will add a new vendor
folder to your install root, and add some dependencies in it. It will also update Kirby and plugins to the required versions. Learn more at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies
After that run command
It will update everything to match the versions in composer.json
file. Learn more at https://getcomposer.org/doc/01-basic-usage.md#updating-dependencies-to-their-latest-versions
And that's about it.
Last updated