← Ecosystem

JoeCMS

joecms.it in production

The PHP CMS the other projects run on, released as open source and published at joecms.it: an engine idle for years brought back to life on PHP 8, a package you install from the browser, and a site that publishes its manual, changelog and downloads.

The problem

Every new project started from the same foundations: users, permissions, email, languages, cache, admin. The engine I had worked on for years, VGallery, was stuck on PHP 7 and would not even start on PHP 8: constructs removed from the language and hundreds of calls on null values that had become fatal errors. For years it stayed that way, a private matter: my projects used it, nobody else did.

The alternatives were a generic CMS bent to fit every project, or a framework to rebuild everything on. I chose to recover the engine: a conservative migration that reproduces PHP 7 behaviour instead of rewriting it, and an installer that turns a ZIP archive into a working site. The next step was getting it out of the house: a product site with the packages, the changelog and the manual, and the GPL-3 licence that had been part of this code's history all along.

How it works

Structure

Content is made of typed nodes with dynamic fields: there is no table per content type, and adding one is configuration, not code. Around it sit declarative XML routing, token-and-block templates, and an admin with grids and forms generated from the database. The core brings the rest: pages, emails and notifications in the recipient's language, page cache per user, group and language, job queues, cron and a Bearer-token API.

Usage flow

You unzip the package into the site folder and open the browser. A ten-step wizard checks the requirements, creates the database, sends a test email, collects the company details and leaves a multilingual site already populated, with legal pages, robots.txt and Apache rules bound to the real domain. The package updates by uploading the new files: since 1.6 the CMS runs on current MySQL and MariaDB servers without asking to relax their settings.

Technical choices

Conservative fixes instead of rewrites, on a codebase without tests: casts and guards, and a lint after every bulk change. The installer is independent of the framework, because it has to run when the CMS cannot start yet. A fatal error becomes a 500 page with a code to look up in the logs, never a file and line on screen: error pages carry the installer's brand and can be replaced from conf/cm/extras/.

Known limits

No automatic updater: every release ships as a ZIP with its checksum, and anyone with an existing site updates by hand, re-checking the few Apache rules the deploy does not touch. And it is still an engine with almost twenty years of history: it lives with a few duplicated framework classes and inherited parts left inert.

The product site

joecms.it is built with JoeCMS itself, in the same four languages as the package: home page, version downloads with checksums, a changelog taken from the latest published ZIP, and a guide in fourteen chapters.

Numbers

PHP files at the starting point, approx. 14,400
Files fixed in the PHP 8 migration 913
Tables in the schema 218
Installation wizard steps 10
Configurable third-party integrations 31
Languages in the base package 4
Published releases 20
Guide chapters 14

Stack

  • PHP 8
  • MySQL / MariaDB
  • Apache
  • SCSS
  • JavaScript
  • XML / JSON
  • Linux
Screenshot of JoeCMS
The public JoeCMS changelog, with the history of the releases
The JoeCMS guide published on the site, chapter by chapter

JoeCMS derives from VGallery (GPL-3) by Alessandro Stucchi.