bigins / scriptor
Lightweight PHP CMS for microsites, blogs and wikis — SQLite + FTS5 search, Markdown, rich-text editing.
Requires
- php: ^8.2
- ext-dom: *
- ext-gd: *
- ext-json: *
- ext-mbstring: *
- ext-pdo_sqlite: *
- bigins/imanager: ^2.0
- dev-master
- v2.0.0
- v1.12.1
- v1.12.0
- v1.11.3
- v1.11.1
- v1.11.0
- v1.10.1
- v1.9.2
- v1.9.1
- v1.9.0
- v1.8.0
- v1.7.1
- v1.7.0
- v1.6.1
- v1.6.0
- v1.5.3
- v1.5.2
- v1.5.1
- dev-chore/composer-keywords-description
- dev-phase-14f-cleanup
- dev-fix/legacy-images-preview
- dev-fix/filepond-field-name
- dev-phase-14e2-listeners
- dev-phase-14d3-frontend-files
- dev-phase-14d2-pages-uploads
- dev-phase-14d1-upload-endpoint
- dev-phase-14c5-install
- dev-phase-14c4-settings
- dev-phase-14c3-profile
- dev-fix/single-entry-router
- dev-phase-14c2-pages
- dev-phase-14c1-auth
- dev-phase-14b3-images
- dev-phase-14b2-basictheme
- dev-phase-14b1-skeleton
- dev-phase-14a-bootstrap
- dev-devel
- dev-pages.fork
This package is not auto-updated.
Last update: 2026-05-16 06:59:25 UTC
README
Scriptor 2.0
Scriptor is a lightweight and versatile CMS for creating microsites, blogs, or wikis. Version 2.0 is a ground-up rewrite on top of iManager 2.0, SQLite and PSR-standards (PSR-3, -14, -16).
Demo: https://demos.scriptor-cms.dev
Highlights
- SQLite storage with JSON columns and FTS5 full-text search.
- Composer-based install on top of
bigins/imanager:^2.0. - PSR-14 domain events drive cache invalidation and file cleanup.
- FilePond uploads with on-demand thumbnail generation through
intervention/image. - Per-image titles as a typed
files.titlecolumn with markdown caption rendering on the frontend. - Single-entry routing (
public/index.phpdelegates/<admin_path>/*toeditor/index.phpin PHP) — works on Apache, Caddy, Nginx, php-S without per-server rewrite rules. public/webroot — source code, the SQLite DB, configs and composer artifacts live OUTSIDE the webroot, so a misconfigured web server cannot expose them.
Requirements
- PHP 8.2+ (8.3 recommended)
- Composer 2
- SQLite 3.38+ (for
json_extract, FTS5) - Standard PHP extensions:
mbstring,dom,json,gd,pdo_sqlite - A web server with its document root pointed at
public/and unknown paths routed topublic/index.php— Apache (public/.htaccessis shipped), Caddy, Nginx, or PHP's built-in server.
Installation
git clone git@github.com:bigin/Scriptor.git
cd Scriptor
composer install
Point your web server at the public/ directory. The installer
creates data/imanager.db on the first request via the schema-migrate
step. To run migrations explicitly:
vendor/bin/imanager schema:migrate --db=data/imanager.db
For PHP's built-in server during local development:
php -S 127.0.0.1:8080 -t public public/index.php
For shared hosting where the webroot is fixed (e.g. public_html/),
see docs/install-shared-hosting.md.
Try it in Docker
A bundled demo stack starts Scriptor 2.0 on http://localhost:8080
with one admin user (admin / scriptor) and one example page:
docker compose up -d --build
See docs/demo.md for what the seed creates, how to
reset to factory state, and what the image is (and isn't) good for.
Admin panel
https://your-website.com/editor/
Default credentials (change them on first login):
User:
admin
Password:gT5nLazzyBob
Performance
bin/perf-smoke.php runs four canonical timing checkpoints against the
live SQLite database. Plan §8.2 budget is getItem < 1 ms,
getItems(20) < 50 ms, FTS search < 100 ms. Typical results on the
bundled demo data:
items()->find(1) 0.009 ms [budget 1.0 ms] OK
findByCategory(pages, 0, 20) 0.025 ms [budget 50.0 ms] OK
FullTextSearch::search("scriptor") 0.037 ms [budget 100.0 ms] OK
FullTextSearch::count("scriptor") 0.009 ms [budget 100.0 ms] OK
Run it yourself: php bin/perf-smoke.php.
Migrating from 1.x
The iManager 2.0 CLI ships a one-shot migrator that reads the legacy
data/datasets/buffers/ files into the new SQLite schema and copies
uploads to the post-migration layout:
# Backup first cp -a data data.bak.$(date +%F) # Dry-run vendor/bin/imanager migrate:from-v1 \ --source data \ --target /tmp/imanager-test.db \ --dry-run # Real migration vendor/bin/imanager migrate:from-v1 \ --source data \ --target data/imanager.db
After the migration finishes you can delete the data/datasets/buffers/
directory. The original 1.x uploads stay in data/uploads/ (untouched);
the migrator copies them into public/uploads/ for the 2.0 file
storage. data/uploads/ is safe to remove once you've verified the
migration on the live site.
Project layout
public/ THE WEBROOT (everything below is web-reachable)
index.php thin front controller
.htaccess Apache fallback (dotfile-deny + front-controller)
themes/<theme>/ static-only half of each theme (css, fonts, …)
editor-assets/ editor's CSS, JS, fonts, filepond, images
uploads/<itemId>/<…> FilePond uploads — served directly
favicon.ico root-level copy for the browser's implicit fetch
boot/ PSR-4 (Scriptor\Boot\) — Frontend, Editor, Events
Frontend/Site, Page, … public site renderer + repos
Editor/Editor, Router, … admin shell + per-module wiring
Events/ domain-event listeners (cache, file cleanup)
ImanagerBootstrap.php DI container + service graph
boot.php bootstrap include (loaded by public/index.php)
themes/<theme>/ PHP source of each theme — _ext.php, lib/,
template.php, vendor/ (NEVER web-served)
modules/ user-installable site modules
editor/ admin entry + lang + PHP templates
index.php delegated to from public/index.php
lang/ en_US.php, de_DE.php
theme/ template.php, header.php, summary.php
data/ runtime state — NEVER web-served
settings/ scriptor-config.php, custom.scriptor-config.php
imanager.db SQLite database
cache/sections/ FilesystemCache (page-level HTML)
logs/, backups/
bin/ CLI helpers (currently: perf-smoke.php)
docs/ themes.md, install-shared-hosting.md, …
Use Scriptor as a library
<?php use Scriptor\Boot\App; use Scriptor\Boot\ImanagerBootstrap; use Imanager\Storage\ItemRepository; require __DIR__ . '/vendor/autoload.php'; App::set(ImanagerBootstrap::create(__DIR__)); // __DIR__ = the Scriptor root $item = App::container()->get(ItemRepository::class)->find(1);
See boot/Frontend/Site.php for the full set of services the bundled
themes consume.
Links
- iManager 2.0 framework: https://github.com/bigin/imanager
- Phase 14 migration plan:
docs/imanager-2.0-phase-14-plan.md(in the iManager repo) - Documentation: https://scriptor-cms.dev/documentation/
- Modules / extensions: https://scriptor-cms.dev/extensions/extensions-modules/
- Demo: https://demos.scriptor-cms.dev
