Choosing a local dev environment
The easiest way to start testing and developing with Kirby is in a local development environment: you can easily edit your files locally, immediately see changes in the browser, and deploy your site on a public server when you are ready.
Kirby has only very few server requirements, and you have therefore many options when choosing the development environment that is right for you–no matter if you want to develop on a Mac, Windows or Linux.
DDEV
DDEV is an increasingly popular Docker-based development environment, that's quickly easy set up on Mac, Linux and Windows. It doesn't require any Docker knowledge unless you have special requirements.
Check out our Kirby meets DDEV cookbook recipe
XAMPP
XAMPP is similar to MAMP, free, and available for Mac, Windows and Linux.
In a default installation, the web root folder is located under programs/XAMPP/htdocs
on a Mac or C:\XAMPP\htdocs
on Windows. XAMPP is probably the most popular GUI tool used on Windows/Linux.
Vagrant + Virtual Box
Vagrant is a command line tool for building and managing virtual machine environments in a single workflow. It supports VirtualBox, a free, cross-platform virtualization solution, but also works with other virtualization products.
It provides a virtual development environment where you don't have to install a server, PHP, database or other development tools on your local computer. The advantage of this solution is that you can install a box that resembles your deployment environment as closely as possible.
Follow their Getting Started guide to get up and running.
Laravel Homestead
Laravel Homestead is an official, pre-packaged Vagrant box and provides a full-featured virtual development environment, that doesn't require you to install PHP, a web server, or any other server software on your computer.
PHP's built-in server
If a recent PHP version that supports Kirby is already installed on your system and you are fine using the command line, you can spin up PHP's built-in server from the command line, specifying the kirby/router.php
file to use Kirby's router.
You should now be able to reach your local server at http://localhost:8000.
While using the built-in server works fine for many use cases, you might sometimes run into issues. We therefore don't really recommend this environment.