Context
WECOZA runs adult education and training across South Africa, the same client group as the Triple E Training site. The operational side is not a content problem. It is agents, learners, classes, clients, sites with a parent-child hierarchy, exams, placements, progressions, attendance, deliveries, collections and QA visits, all of which have to reconcile. That is why it is a custom system rather than an off-the-shelf CRM; this guide covers when that trade is worth making.
From the WordPress dashboard it looks like an ordinary custom plugin: admin menus, shortcodes, AJAX endpoints, a settings page.
The problem
This is the point where most WordPress projects go wrong. The data model is real (dozens of related entities with strict invariants) and the instinct is to model it in custom post types and post meta, then enforce the rules in PHP.
That works until it doesn’t. Post meta has no types, no foreign keys and no constraints, so every rule becomes a function somebody has to remember to call. And the data ends up trapped: it only exists in a shape WordPress understands, which means the CRM, a mobile app or anything else that wants it has to go through WordPress to get it.
The business needed its data to be valid independently of the CMS displaying it.
What I did
The plugin talks to its own Postgres database over PDO, deliberately bypassing $wpdb. The tables model the operation properly, plus an event log that feeds a notification engine: one background job works through each event and a second sends the email. I wrote up how that connection works, and why WordPress itself stays on MySQL, in connecting WordPress to PostgreSQL.
Some of the rules sit in the database itself: unique indexes, CHECK constraints, and triggers that stop edits to deleted records and keep a site with its client. Those hold whether the write came from the plugin, a script, or someone at a psql prompt. Other rules, such as the class status workflow, live in PHP.
The PHP layer does the presentation, the integration and the workflow. WordPress here is a rapid application framework with the boilerplate already solved, not a blogging platform being bullied into a job it hates.
The requirements came in as meeting notes, PDFs and spreadsheets as well as tickets.
The result
An operations platform in production use. The business data sits in its own database rather than inside WordPress.

