Skip to content
W
Sign in
Version 4.0: native templates, Markdown, REST API

Build pages from
database rows, not boilerplate.

WBengine assembles every page from sites, sections and boxes stored in MySQL. Fast native templates, automatic escaping, a REST API with roles, two level caching and real internationalisation, in a framework small enough to read in an afternoon.

PHP
8.3 – 8.5
Runtime packages
2
Cached page
0 SQL
License
MIT
src/Box/Central/Hello.php
class Hello extends WbengineBoxAbstract
{
    public function Hello()
    {
        // a row in cms_boxes points here
        return $this->getRenderer()->render(
            $this->getBoxTemplatePath(),
            ['name' => 'World']
        );
    }
}
<h1>{t 'hello' name=$name}</h1>

Features

Everything a content site needs, nothing it does not

Each card opens a page of this application that explains the feature and, below the text, shows it working on the request you are looking at.

Request lifecycle

From a URL to a page in four steps

The same four steps run for every request. Open the architecture page to see them with the real queries.

  1. 1

    Match the site

    The URL is looked up in cms_sites. No row: 404. The language prefix is read first and removed.

  2. 2

    Load the sections

    Each active section asks cms_boxes which boxes belong to this site, in order.

  3. 3

    Run the boxes

    A box is a PHP method that returns HTML, usually from a model and a template.

  4. 4

    Render the layout

    The section HTML lands in site.tpl. Anonymous pages can be stored whole by the page cache.

Run it in two minutes

The skeleton ships with a Docker setup, a demo database and an administrator account.

git clone https://github.com/rrsoftcz/wbengine-skeleton-app
docker compose up -d --build