Got a project?

Get in touch
All work

WECOZA, adult education and training

A WordPress plugin with a Postgres database behind it.

An operations platform for a South African training provider, where WordPress runs the screens and a separate Postgres schema holds the business data.

Client
WECOZA, adult education and training
Year
2024 to 2026
Role
Developer: schema design, plugin, integration, ongoing maintenance
WECOZA, adult education and training website

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.

Got something like this that needs building?

A few lines about what you’re trying to build or fix is enough. It lands in my inbox and I reply within the business hour, honestly, including whether I’m the right person. If I’m not, I’ll say so and point you at someone who is.

I reply to every enquiry within one business hour.

Prefer email? support@yourdesign.co.za· (+27) 079 177 1970

Next case study: Confidential, lending →