ExpressionEngine Legacy Site Audits

Editorial operations specialist auditing content workflows
Editorial operations specialist auditing content workflows (Photo via Unsplash)

Every few years, a client hands you SSH access to a Linux box nobody has touched since 2017. You check PHP, hoping for 7.4, and get PHP 5.6.40 under Apache mod_php after two tarball hosting moves. Inside sits a decade-old ExpressionEngine install—usually 2.9.2 or 2.11.9—serving 35,000 pages while held together by twenty-odd third-party add-ons whose vendors folded years ago.

Nothing is visibly on fire, which is the trap. Pages render, editors publish updates, and management assumes an upgrade is a weekend job. Then you open MySQL. What looks like a tidy CMS is ten years of compounding technical debt: 185 custom fields packed into one table, templates running raw PHP against dead CodeIgniter objects, and homepage hits firing 410 queries just to draw a nav bar and three featured posts.

Auditing legacy ExpressionEngine isn't architecture theory. It's forensic engineering. Before quoting a migration or rebuild, you need hard numbers on three things: which add-ons hold real data, where templates burn CPU, and how cleanly you can separate channel content from presentation hacks.

Mapping the Add-On Graveyard First

ExpressionEngine 2 won agencies over because core stayed lean while commercial add-ons filled every gap. Repeating rows meant Matrix. Multi-entry relations meant Playa. Dynamic crops meant CE Image. Whenever EE's parse order got awkward, engineers wired up Stash to cache partials and pass variables across scopes.

Ten years later, system/expressionengine/third_party/ is your biggest hazard. Half its folders are abandoned, broken on PHP 8, or replaced by native EE 3 through EE 7 features. Worse, the filesystem lies. Agencies uploaded plugins for prototypes, forgot them on disk, or uninstalled modules while leaving dead tags in templates.

Start in MySQL, not the filesystem. Query the registry tables to see which fieldtypes own columns in production channels:

SELECT ft.name AS fieldtype, ft.version, COUNT(cf.field_id) AS fields
FROM exp_fieldtypes ft
LEFT JOIN exp_channel_fields cf ON cf.field_type = ft.name
GROUP BY ft.name, ft.version
ORDER BY fields DESC;

Cross-check against exp_modules and exp_extensions where enabled = 'y', then search templates for {exp: tags. On a 2014 manufacturing site I audited, third_party/ held 31 folders. Only 14 existed in the database, and just 9 appeared in live templates. Seventeen directories were dead weight.

Sort surviving add-ons into three buckets:

  • Native replacements: Matrix converts to Grid, Playa maps to Relationships, and Assets simplifies to the modern File Manager. Nested Matrix-plus-Playa fields need scripted checks, yet the data shapes align.
  • Maintained successors: Low Variables and Low Search continue under Packet Tide's Pro add-ons, while CE Image tags port cleanly to JCOGS Image or native manipulations.
  • Structural dead ends: Bespoke contractor modules, abandoned e-commerce suites, and deep Stash pipelines. These dictate your budget.

Anyone who weathered a Concrete5 to Concrete CMS migration knows this inflection point: core evolved while marketplace extensions froze. In EE, the twist is how tightly add-ons weave into template tags and sidecar tables.

Profiling Template Queries and Parse-Order Traps

When an inherited EE site posts a 1.4-second time to first byte under twenty concurrent visitors, database hardware is rarely at fault. Template habits colliding with EE's nine-stage parse order do the damage.

Before guessing, enable ExpressionEngine's Output Profiler and Template Debugger on a staging clone, gated to your IP in system/expressionengine/config/config.php:

if (isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] === '203.0.113.42') {
    $config['show_profiler'] = 'y';
    $config['template_debugging'] = 'y';
}

Load the homepage, an archive listing, and an article page, then read the footer report. It logs render time, peak memory, every SQL query with millisecond timings, and every parsed tag. Three habits cause 80 percent of query bloat.

Nested Embeds Inside Loops

An {embed="includes/card"} tag isn't a cheap include; it boots a fresh template parser pass. Drop an embed inside an {exp:channel:entries limit="20"} loop and you trigger twenty sub-template parses. Put another entries tag inside that embed for author bios, and one listing jumps from 24 queries to 340. Moving static fragments to EE partials (formerly Snippets) or pre-fetching relationships slashes queries overnight.

Unconstrained Channel Entries Tags

By default, {exp:channel:entries} assumes every call needs URL routing, member profiles, category joins, category fields, and pagination counts. A sidebar listing five recent posts needs none of that. Audit templates for missing dynamic="no", explicit limit values, and disable exclusions for member_data, categories, and pagination. Turning off unused lookups across four shared partials once dropped an article page from 198 queries to 41, cutting median response time from 920 ms to 180 ms.

Raw PHP Inside Templates

The ugliest surprise in old EE installs is PHP enabled inside templates on the Input stage (before EE tags parse) or Output stage (after). Impatient developers bypassed EE tags to query $this->EE->db, gone since EE 3, or call mysql_query(), removed in PHP 7. Inventory every instance:

SELECT tg.group_name, t.template_name, t.php_parse_location
FROM exp_templates t
JOIN exp_template_groups tg ON tg.group_id = t.group_id
WHERE t.allow_php = 'y'
ORDER BY tg.group_name, t.template_name;

Check flat-file sync drift while in exp_templates. Verify whether save_tmpl_files is active and compare database edit_date values against file timestamps on disk. Teams often refactor flat files for days before noticing production still serves stale rows from MySQL.

If a template needs Stash, two nested embeds, and PHP parsed on Input just to render a filtered product grid, stop tuning the template. You're staring at a data-modeling failure disguised as a caching problem.

Separating Channel Data from Presentation Glue

ExpressionEngine's strength is also how old databases rot: channels are completely unopinionated. One models a clean entity like "Case Studies," while another becomes a junk drawer for hero banners, cookie notices, footer links, and seasonal promos. After ten years and four agencies, real content and layout glue are braided together.

In EE 2 and EE 3, schema design compounds the mess. Every custom field lived as two columns—field_id_N and field_ft_N—inside one wide exp_channel_data table. Past 150 fields, sites hit InnoDB's row-size limit, making schema upgrades tense. EE 4 split custom fields into per-field exp_channel_data_field_N tables, a huge relief once you survive the upgrader.

Separate canonical content from layout glue by profiling channel activity:

SELECT c.channel_id, c.channel_name, COUNT(ct.entry_id) AS entries,
       FROM_UNIXTIME(MAX(ct.edit_date)) AS last_edited
FROM exp_channels c
LEFT JOIN exp_channel_titles ct ON ct.channel_id = c.channel_id
GROUP BY c.channel_id, c.channel_name
ORDER BY entries DESC;

You'll spot channels with three entries untouched since 2015 beside a catalog of 18,000 live records. Next, script a population count across custom fields; 30 to 40 percent are usually blank or hold retired campaign data. Dropping dead fields early cuts migration risk sharply. Scan rich-text fields too for inline Bootstrap markup, hardcoded upload paths, and raw tokens like {filedir_3}brochure.pdf that must resolve against exp_upload_prefs before export.

Separating structured content from layout chrome is a recurring publishing lesson. Look at the Ibexa DXP and eZ Publish heritage, where strict content types and location trees enforced that boundary inside the engine. ExpressionEngine left that discipline to the builders, and your audit tallies the bill.

Upgrading in Place vs. Replatforming

With add-on inventories, query baselines, and channel usage documented, the decision stops being emotional. Engineers default to rewrites; finance fears SEO and budget shocks. Let the audit numbers decide.

When Upgrading in Place Wins

ExpressionEngine 7 is a fast, PHP 8.2-ready monolithic CMS with native Grid, Relationships, CLI tools, and normalized field tables. If 80 percent of your site's value sits in clean channels, editors like the control panel, and active add-ons have native replacements, upgrading in place beats a rewrite on cost and risk.

Don't underestimate staging mechanics. No single PHP binary runs both EE 2 and EE 7, so run a stepped migration inside disposable Docker containers:

  1. Update a snapshot to EE 2.11.9 on PHP 5.6 or 7.0, converting Matrix to Grid and Playa to Relationships while legacy converters run.
  2. Step to EE 3.5.17 on PHP 7.2, removing allow_php templates and dead CodeIgniter calls.
  3. Pass through EE 5.4.x on PHP 7.4 so the upgrader splits exp_channel_data into per-field tables.
  4. Upgrade to EE 7 on PHP 8.2 or 8.3, re-profile top templates, and verify URL parity.

For a 20,000-entry site with a sane add-on footprint, budget three to six weeks.

When Replatforming Is the Honest Call

Replatform when ExpressionEngine fights the business. If five abandoned custom modules run member portals or pricing tools, upgrading EE just preserves bespoke legacy PHP inside a CMS wrapper nobody wants to own. The same holds if channels are tangled with layout hacks and editors need live previews, multi-step workflows, or SSO.

If you leave EE, resist rebuilding a publishing site as a decoupled SPA backed by three SaaS APIs. We've examined headless CMS versus monolithic reality before, and most editorial teams don't need Jamstack build pipelines to publish articles and docs. Spend an afternoon reading independent CMS platform reviews at CMS Connection alongside your audit so you judge five-year maintenance overhead instead of vendor demos.

A First-Week Audit Checklist

When you inherit an ExpressionEngine repo on Monday, skip patching templates right away. Spend five days building an evidence pack:

  • Clone production into Docker matching exact PHP and MySQL versions before touching config or schema.
  • Dump active fieldtypes, modules, extensions, and allow_php templates from SQL, then reconcile against disk.
  • Profile your top ten URLs and log baseline SQL query counts, memory peaks, and render times.
  • Map every channel's entry count, last edit date, blank fields, and {filedir_N} tokens so dead weight never migrates.
  • Price both the stepped EE 7 upgrade and a clean replatform honestly—including six months of post-launch operations.

A decade-old ExpressionEngine site survived because someone built something durable enough to run a real business. Audit it with that same pragmatism: measure what executes, cut the abandoned add-on drag, and only rebuild what justifies the cost.

Comments

Popular posts from this blog

Hippo CMS SEO and Structured Trees

Why Enterprise CMS Projects Overrun

Drupal Relaunch Without SEO Collapse