Skip to content

Porting a site

Use with AI

This page

Ask ClaudeAsk ChatGPT

All of CaraCMS Docs

Connect once, and it answers your questions from this help.

Connect to ClaudeConnect to ChatGPT

Porting is moving a site that already exists onto CaraCMS. The guides in this section each cover one starting point. This page is what they have in common.

The bar: visitors’ pages look the same

A port changes what editors can do, not what visitors see. Every page is compared with the site as it was, and the port isn’t finished until they match. A redesign is separate work, for after the switch.

How the work goes

  1. Add CaraCMS. caracms init adds the config, the catch-all route and the skills, and leaves the site’s pages alone.

  2. Keep a copy of the old site running to compare against.

  3. Move the content. Each page’s sections become blocks, and its words and pictures become a content file.

  4. Rewrite each block onto CaraCMS’s components, keeping its markup and classes, so its text can be typed on the page.

  5. Compare every page with the old site, on a desktop and a phone width.

  6. Model it for the editor. Put each piece of content where an editor will look for it.

  7. Deploy it somewhere that can’t touch the live site, try the editor there, then switch.

Comparing pages

The package ships a script that does the comparison. It screenshots each page of the old site and the new at two widths, and writes a side-by-side report with the share of pixels that differ and any change in height. It also compares each page’s HTML.

Passing means no pixels differ and no page changes height. Each difference in the HTML should be one the rewrite explains.

Modelling for the editor

A straight copy of the old content’s shape usually suits the old system more than the people editing. Once the pages match, it’s worth changing what gets in an editor’s way:

Common in an older setup

Becomes

An order number on every entry

An order editors set by dragging

A collection only one block reads, such as an FAQ

A list on that block

A “featured” toggle that decides what one block shows

A list on that block, of the entries it shows

A dropdown of icons kept in the code

An image field

Labels that name the code

Labels that say what the editor sees

This changes where editors make a change, never what visitors see, so the comparison is run again afterwards.

Checking the editor

The last check is in the editor itself: click every visible word on every page and see that it opens a field. The audit command lists what clicking can miss.

Terminal window
npx caracms audit

Switching over

A port is deployed from its own branch to its own environment first, never straight to production. Two settings keep that environment away from the live site: it publishes to the port’s branch, not main, and its forms send to you, not the client.

The switch itself is short: put the real form recipients back, merge the branch, set production’s variables, and retire what the old system needed.

Who does the work

Most of a port is done by an AI agent working in the site’s repo, following the skill for that starting point. Your part is the decisions: which blocks the site ends up with, what gets re-modelled, where it’s hosted, and when it switches.