|Folder||What's in it?|
||The content of your website.|
||Think of this folder as your project folder. It contains your templates, configuration, plugins and setup files (blueprints) for the Panel.|
||The Kirby app. Great for studying the source code, but in general you should leave this folder untouched (apart from updating it when a new version is released).|
||This folder is managed by Kirby and holds public images and thumbnails as well as plugin and Panel assets. Let Kirby do its work and leave this folder as it is. The media folder and the files in it are auto-generated.|
Our Starterkit has an additional
/assets folder, we use it to store CSS files. This is just a convention we use. It's not required by Kirby.
Your content is stored directly in your file system. In your
/content folder to be exact. Kirby doesn't need a database. Each subfolder of your content folder represents a page.
The content for each page is stored in a text file together with additional resources like images, videos, or other documents. The
site.txt in the content folder contains general site-wide information.
In each text file in the content folder, content is structured in fields. Those fields are defined by our own simple syntax:
Those fields come for free. You can add as many as you need. We recommend using them heavily to structure your content. It will help you later if you need to access specific data in your templates and is much cleaner than just one large blob of text.
All the data that is stored in your content folder can be pulled into your templates to render the pages of your site. Kirby templates are a combination of plain HTML and bits of our powerful PHP API. You don't need to be a PHP expert to get started writing templates. We will guide you through it.
A typical Kirby template looks like this:
Kirby's web interface is called the Panel. You can find it at
While you can manage your site 100% in the file system, the Panel makes it a lot more comfortable to add new pages, edit content or upload files. In the background it will do all the hard work of creating folders and files for you.
The Panel is very versatile and can be customized to fit every project. To set up the Panel, you will use Kirby's so called blueprints to configure layouts, form fields, permissions and more.
Now that we have explored the parts, you might wonder how it all fits together. If you have explored the folders of the Startkit a bit, you might have noticed that there are a lot of files with the same file name but different extensions, for example
These files are in fact tied together by their filenames. The content in
about.txt is rendered with the
about.php template. And if you visit the
about page in the Panel, the
about.yml blueprint takes care of displaying the form fields for the fields in the text file.
Whenever you upload a file to a page via the Panel, the file is uploaded to the content folder. However, as soon as the URL of the file is called in the browser, the file is copied to the media folder.
Also, all thumbnails are created on the fly and stored in the media folder. Therefore, this folder needs to be publicly accessible within the document root. This setup was chosen because it has some real advantages, like providing consistent image URLs or being able to move the content folder (and most other folders) above the document root for better security (see custom folder setup).
In addition to files and thumbs, the Panel also stores its assets in this folder. The
media folder is generated automatically when removed and you should leave it untouched, i.e. do not use it to store files there, and do not deploy this folder to your remote server.
We also recommend that you delete the
media folder when you update Kirby.
Any Kirby site can be translated into multiple languages. Languages can be added via the Panel and content can be translated by your editors.
You can add multiple users to your installation and assign roles with permissions to each of them. You can give users Panel or just frontend access and build your own client or member area for your site.
Kirby has a very versatile and extensive plugin system that can extend pretty much any part of the system. There are many fantastic third-party plugins that you should definitely check out. But it's also easy to start building your own plugins.
Kirby has a built-in REST API that you can use for your own single page applications, mobile apps or in combination with a static site generator such as Gatsby.
If you want to break out of Kirby's URL structure, you can create your own custom routes and use Kirby more like a framework. Or you could create just a few routes next to the built-in ones in Kirby for special use-cases.
Contact form replies, user notifications, tiny newsletters – it's up to you what you build on top of Kirby's email engine.
Kirby has a built-in page cache that makes slow pages with a lot of content super fast. But there's much more to discover. You can use our caching system for your own data – and in your plugins. Or maybe you want to cache everything in Redis? Let's create a custom cache driver.
Yes, you read that right. Even though Kirby is a file-based CMS, you can connect parts of it to a MySQL or SQLite database.