Skip to content

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 WordPressIn MelaCMS
WordPress core, updated from the dashboardThe core package, updated with php artisan mela:update on your machine and shipped as a release
wp-adminThe Filament panel at /admin
ThemeBlade views, Tailwind and Alpine in the site's resources/
Page templateA view in resources/views/pages, offered to editors by its file name
PagesPages, provided and served by the core
Custom post typeAn 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 libraryThe 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 pluginSEO, built in: @seo, @hreflang, /sitemap.xml
Settings → General, theme optionsThe Settings page, extended from the site
Users and rolessuper-admin, admin, editor, checked in policies
functions.php and small pluginsCode in the site: service providers, routes, controllers
Shortcodes, page builder blocksBlade components in views. Editors choose a template and fill its fields
Upload over FTPA release deployed by GitHub Actions over SSH
Copying the database between environmentsMigrations in git. Only content lives in each environment's database
Plugin update in productionA Composer update on your machine, through CI, shipped as a release

How the data is stored ​

WordPressMelaCMS
RecordsEvery post type in wp_postsOne table per kind of content
Custom fieldsOne row per field in wp_postmeta, the value in an unindexed text columnColumns of the right type, indexable, in the record's own row
A record with 20 fields21 rows1 row
Filtering a list by a fieldA join on wp_postmeta per fieldA where on an indexed column
TranslationsUsually a copy of the post per language, linked by a pluginJSON columns in the same row
Fields for one template onlyField groups stored as metafields.*: one JSON column on the page, no migration
Code that runs on every requestEvery active pluginWhat 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:

  1. An admin opens /admin/languages, picks another default language and saves.
  2. Nothing in the database moves. Every translation is still in its record's row.
  3. The new default language is served at the root of the site and the old one moves under its prefix (/it/...). Links built with route(), url() and Languages::url() follow at once, with no routes to rebuild and no cache to clear.
  4. 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.

Code released under the MIT License. The MelaCMS name and logo are trademarks, see Brand.