MelaCMS for WordPress developers
If you have delivered sites with WordPress, most of MelaCMS will feel familiar from the client's side, and different from yours. This page maps what you know to where it lives now.
The main difference
In WordPress a lot of the site lives in the database: plugin options, custom field groups, menus, page builder layouts. In MelaCMS the database holds content only. Everything that decides how the site works is code in the site's repository, reviewed in a diff and covered by tests.
Concepts
| In WordPress | In MelaCMS |
|---|---|
| WordPress core, updated from the dashboard | The core package, updated with php artisan mela:update on your machine and shipped as a release |
wp-admin | The Filament panel at /admin |
| Theme | Blade views, Tailwind and Alpine in the site's resources/ |
| Page template | A view in resources/views/pages, offered to editors by its file name |
| Pages | Pages, provided and served by the core |
| Custom post type | An entity: a migration, a model, a Filament resource, a controller and views |
| Custom fields (ACF and the like) | Columns in the migration, fields in the resource form. For one page template: fields.* on the page form, no migration |
| Media library | The media library, with WebP sizes made at upload |
| Multilingual plugin (WPML, Polylang) | Languages, built in: JSON columns and translated addresses. The default language can be changed at any time |
| SEO plugin | SEO, built in: @seo, @hreflang, /sitemap.xml |
| Settings → General, theme options | The Settings page, extended from the site |
| Users and roles | super-admin, admin, editor, checked in policies |
functions.php and small plugins | Code in the site: service providers, routes, controllers |
| Shortcodes, page builder blocks | Blade components in views. Editors choose a template and fill its fields |
| Upload over FTP | A release deployed by GitHub Actions over SSH |
| Copying the database between environments | Migrations in git. Only content lives in each environment's database |
| Plugin update in production | A Composer update on your machine, through CI, shipped as a release |
How the data is stored
| WordPress | MelaCMS | |
|---|---|---|
| Records | Every post type in wp_posts | One table per kind of content |
| Custom fields | One row per field in wp_postmeta, the value in an unindexed text column | Columns of the right type, indexable, in the record's own row |
| A record with 20 fields | 21 rows | 1 row |
| Filtering a list by a field | A join on wp_postmeta per field | A where on an indexed column |
| Translations | Usually a copy of the post per language, linked by a plugin | JSON columns in the same row |
| Fields for one template only | Field groups stored as meta | fields.*: one JSON column on the page, no migration |
| Code that runs on every request | Every active plugin | What the site wrote, with config, routes, views and events cached on deploy |
WordPress's single meta table is what makes it fit any content without a migration. MelaCMS keeps that for small, template-specific fields, and gives anything that grows or gets queried a real table. An agent writes that table, its model and its admin screen in one go, from the entity guide.
Changing the default language
With WPML, each translation is its own post, linked to an original in the default language. Changing the default language after the site is built is a project. That happens when the client changes their market, or when someone picked the wrong language at install.
In MelaCMS the default language is one choice on the Languages page:
- An admin opens
/admin/languages, picks another default language and saves. - Nothing in the database moves. Every translation is still in its record's row.
- The new default language is served at the root of the site and the old one moves under its prefix (
/it/...). Links built withroute(),url()andLanguages::url()follow at once, with no routes to rebuild and no cache to clear. - A page or entity with no address in the new default language keeps the address it had, because an address falls back to the default language and then to the next site language that has one.
What is left is the content itself: a record that was never written in the new default language still needs that translation. See Languages.
What the client sees
The client still logs in to an admin panel and writes pages, uploads images, translates content and changes the contact details of the site. They cannot install plugins or change how the site works. That is deliberate: what they can break is limited to content.
What you give up
- The plugin directory. A feature is written in the site, usually by your coding agent, with a test. Any Laravel or Filament package can still be required with Composer.
- A page builder. Templates are views. A template that needs more fields gets them from the site.
- FTP-only hosting. The deploy needs SSH on the server. Most shared hosts offer it.
What you gain
- An agent that can read the whole site, change it and run its tests.
- One way to do each thing on every site, so what you and your agent learned on the last site holds on the next.
- A pipeline from the first commit: CI on every push, a version and a changelog for every release, a deploy for every tag.
- Languages and SEO without paid plugins.
- A site that stays fast as its content grows, on the same cheap host.