Frontmatter

Frontmatter Solo — PHP adapter

Convert Astro to plain PHP templates.

The PHP adapter turns a constrained Astro project into escaped PHP pages, layouts and partials, plus a variable contract. It does not implement the host application.

Plain PHP includes · $fm contract · $49 one-time

Input is a Solo-compatible constrained Astro project, not arbitrary HTML. Solo generates templates and documentation. Controllers, routing, authentication and data wiring stay yours.

Use this adapter when the backend already speaks PHP includes: a custom app, a legacy CMS, or WordPress wiring. If the host runs Twig, use the Twig adapter instead.

WordPress is one integration use case of this adapter. It does not get a complete installable theme. See Solo for WordPress for that handoff.

The Astro frontend is done.

The PHP codebase needs templates, not another rewrite of the UI.

Someone still has to map every prop to a variable.

Solo prints the PHP files and the contract.

Input — constrained Astro
<!-- Astro component — literal props only -->
<Hero headline="Hello Solo" sub="Build-time PHP output" />
Output — escaped PHP partial
<?php // partials/hero.php — generated by FM Solo ?>
<section class="hero">
  <h1><?= htmlspecialchars($fm['props']['headline']) ?></h1>
  <?php if (!empty($fm['props']['sub'])): ?>
    <p><?= htmlspecialchars($fm['props']['sub']) ?></p>
  <?php endif; ?>
</section>

Variable access

$fm everywhere

Partials read $fm['props']. Pages and layouts read $fm['site'], $fm['page'], $fm['data']. Strings are escaped with htmlspecialchars() by default.

Documentation

manifest.json + INTEGRATION.md

Every expected key is listed. The PHP developer populates $fm from the real data source — Solo does not fetch it.

Use cases

Custom PHP, legacy CMS, WordPress wiring

Plain includes. No Twig, Blade, or WordPress APIs in the generated files.

Non-features

Not a backend

No routing, authentication, forms, queries, or CMS bootstrap. Those remain in the host application.

What gets generated

output/
├─ pages/
│  └─ index.php
├─ layouts/
│  └─ base.php
├─ partials/
│  └─ hero.php
├─ manifest.json
└─ INTEGRATION.md

Include the files from your PHP app. Populate $fm first. See the PHP adapter docs for mapping rules.

What this adapter does not generate

  • a router, controller layer or authentication
  • a CMS, admin, or database layer
  • WordPress functions.php, hooks or ACF config
  • runtime code inside your Astro site

Frequently asked questions

What does the PHP adapter generate?

Plain PHP pages, layouts and partials, plus manifest.json and INTEGRATION.md. It does not generate a framework or a CMS.

How do I access variables?

Partials read $fm['props']. Pages and layouts read $fm['site'], $fm['page'], and $fm['data']. Your PHP application populates $fm before including the generated files.

When should I use PHP instead of Twig?

Use PHP for custom apps, legacy CMS codebases, and WordPress wiring. Use Twig when the host already runs Twig.

Is this a complete WordPress theme?

No. See Solo for WordPress for the WordPress use case. Solo never generates functions.php or hooks.

Does Solo require a specific Astro project?

Yes. Input is a constrained Astro project, not arbitrary HTML. Run npx @withfrontmatter/solo-check first.

Free · Open source

Check compatibility before you buy.

solo-check is a free CLI validator. It scans your Astro project against the Solo contract and tells you exactly what is and isn't compatible before you purchase anything. Use --help-ai if you want the packaged AI workflow.

npx @withfrontmatter/solo-check

Command copied

Example output

✓ src/pages/index.astro — OK
✓ src/layouts/Base.astro — OK
E201 src/pages/contact.astro:13 Non-literal props used in component Hero.
  Fix: Use only string, number, boolean, or null props in Solo v1.

──────────────────────────────────────────
1 error · 0 warnings

Tip: use the AI workflow to fix these errors automatically.
     npx @withfrontmatter/solo-check --help-ai
──────────────────────────────────────────

Exit 0 means your project is ready for Solo. Use npx @withfrontmatter/solo-check --help-ai if you want the packaged AI fixing workflow. View on GitHub ↗

$49

One-time purchase. No subscription.

  • CLI — macOS, Linux, Windows (Node)
  • Desktop app — macOS 12+ · Apple Silicon
  • Plain PHP output
  • Twig output included
  • Starter reference project included
  • INTEGRATION.md auto-generated
Buy Frontmatter Solo

Provided as-is. Requires a Solo-compatible Astro project. No guarantee of compatibility with all PHP hosts. Support is best-effort.

Backend logic, routing and CMS wiring are not generated.