Configuration
Configuration (config.php)
Most settings live in Admin → Settings and are stored in the database. For the few things that must be set before the blog runs, copy config.sample.php to config.php and change what you need:
<?php
return [
// Where the SQLite database lives. Outside the web root is safest, if your host allows it.
'db_path' => __DIR__ . '/data/postbase.sqlite',
// Asked for on the first-run setup screen before the first admin is created.
// Recommended on standalone installs.
'setup_key' => '',
// Image upload limits. Larger photos are resized to max_image_px wide (needs GD).
'max_upload_mb' => 5,
'max_image_px' => 1600,
// Public demo site only. NEVER on a real blog. See "Running a public demo".
'demo' => false,
'demo_reset_minutes' => 60,
'demo_key' => '',
];
| Key | Default | What it does |
|---|---|---|
db_path | data/postbase.sqlite | Location of the database file. Moving it outside the web root is the safest choice. |
setup_key | empty | When set, the first-run setup screen asks for it before creating the first admin. |
max_upload_mb | 5 | Maximum image upload size, in MB. |
max_image_px | 1600 | Larger images are resized to this width (needs GD). |
demo, demo_reset_minutes, demo_key | off, 60, empty | Public demo mode. See Running a public demo. |
config.php is never overwritten by updates.
