Correct way of hooking into Kirby from external PHP script


I have an external PHP script which is part of my build process that “hooks” directly into Kirby. I wanted to know if there was a safer/better way of doing this.

#!/usr/bin/env php


require 'dist/kirby/bootstrap.php';

new Kirby;

// The rest of my script that uses kirby() function

I mean, this works perfectly, I’m just not sure if it’s the best way.


That’s what we also do here:, so yes.

Excellent, thanks Sonja!