ShepherdUX

Cookies and storage

Your choices.

What this site keeps in your browser so it works, a page count that keeps nothing there, and the one thing it asks you about.

Needed to run

Your day or night setting, the last few things you searched for, and the answer you give here. They stay in this browser and are never sent anywhere.

Always on

Page count

Ahrefs counts page views: the page, where you came from, your language and screen size. It sets no cookie, keeps nothing in your browser, and cannot tell one visit from the next. Ahrefs holds the count under their own privacy terms.

Always on

Analytics

PostHog counts visits: which pages and cards get read, how far along a world people travel, and where they leave. No account, no name, no adverts, and no tracking across other sites. One first-party cookie and a matching browser store mark a return visit as the same visitor. The count is held by PostHog Inc. on servers in the United States, under their own privacy terms.

Back to the library

How this site is made

The PHP panel that writes files

How this Journal's PHP panel publishes entries as files, how Grav, Kirby, Statamic and Git editors compare, and when to build your own.

On a sunlit terrace in Sindh, one carved wooden printing block rests on a table while printed cloths dry on lines.

The panel behind this Journal is a headless CMS in PHP, a content management system with no public design of its own, yet a reader who opens a published entry runs no PHP. PHP renders the page once, at publication, and writes it to disk as a file the web server sends to every reader. This entry traces how, sets the panel beside the ready-made PHP systems, and says when a small panel is the wrong choice.

Choose a content system by who edits and how often, then check that the public page is a file you could copy elsewhere.

A headless CMS is a content management system that stores and edits content and leaves the public pages to another tool, often through an API. That tool might be a static site generator, which creates page files, or a front-end framework, which provides code for building the public interface. The word "headless" means the editing side has no fixed public design of its own.

The PHP options a builder weighs

Flat-file systems keep content as files and render pages in PHP: "There is no database needed," says Grav's requirements page. Kirby stores content in text files, and Statamic's core concepts say it "operates in flat file mode by default".

Git-based editors keep content in Git, the version-control tool. Decap CMS keeps content "in your Git repository alongside your code", and Sveltia CMS reads and writes only files in the repository. A host set to build on each commit then rebuilds the site.

Headless WordPress sends its content out as JSON, a text format for data, through the REST API. Astro's WordPress guide fetches it when the site is built. Cockpit is a PHP content platform built for that pattern, on PHP 8.3 or later with SQLite or MongoDB; its API documentation offers REST and GraphQL playgrounds.

Source: each project's documentation and pricing pages, read 15 November 2026; this site's repository at commit 6f4bfee5.
Option Content lives in Public pages Licence for one public site Lowest PHP
Grav plain text files rendered in PHP on request MIT, free 8.3.11 (Grav 2)
Kirby text files rendered in PHP; static export by a third-party plugin paid licence per site 8.2
Statamic flat files by default rendered in PHP, or static with its SSG package Core free; Pro paid per site 8.3
Decap CMS the Git repository built by a host set to rebuild on each commit open source, free runs in the browser
Sveltia CMS the Git repository built by a host set to rebuild on each commit open source, free runs in the browser
This Journal's panel MySQL rows with Markdown bodies static HTML files written on publish the studio's own code 8.4

Grav is MIT-licensed. Statamic's pricing page lists Core as free and Pro as paid per site, and its requirements ask for PHP 8.3. Kirby needs a paid licence for a public site; its requirements list PHP 8.2 to 8.5.

What the PHP panel stores

The Journal's panel is ShepherdUX's own content system, written in PHP 8.4 for a shared hosting plan. It keeps accounts, entries, tags and media in MySQL, a database system, with SQLite standing in during local testing. An entry's body is Markdown, plain text with symbols that mark headings, links and other formatting.

Blocks such as this page's summary use container directives, markers like :::faq that tell the renderer which block to draw, and the renderer supports 18 of them. There is no Composer. The one outside library, the Parsedown Markdown parser, is a single file kept in the repository, patched for PHP 8.4 and run in safe mode, so raw HTML in an entry appears as text.

The source is 33 PHP files and 12,292 lines, measured on this site on 15 November 2026. The largest file is the public site module, which turns entries into pages, archives and feeds; the block renderer and media handling come next. Sign-in asks for a second factor beyond the password, backups are encrypted, and forms limit how often anyone can submit them. All of it runs on the admin side, and none of it on a public page.

Under an overcast sky, an open wooden case holds a knife, a whetstone and a tin on a stone sill in Hunza.

The whole kit fits in one case. Choose a small panel only when one team can maintain every part.

What a publish writes

Publishing writes a complete HTML page to journal/<slug>/index.html in five steps, and only the last one involves a reader.

  1. Write the entry as a file.

    An entry starts as content/journal/<slug>.md, with YAML frontmatter, settings written in a format that uses named fields, followed by Markdown. The importer accepts 15 frontmatter keys and stops on any other, naming it, so a misspelt key cannot drop a field without anyone noticing.

  2. Import it into the panel.

    The import script reads the file, checks it, copies the pictures beside it into the media library and writes the entry's row. A dry run reads and reports without writing anything.

  3. Render it once.

    On publish, the baker, the code that creates page files, converts the Markdown through the same function the panel's preview uses. It wraps the result in a page shell, a reusable page template, taken from the Astro build. Astro is the tool that builds the main site, so the Journal shares that site's design.

  4. Write the page to disk.

    The baker writes journal/<slug>/index.html under the web root as a temporary file in the same folder, then renames it over the old page. A reader mid-publish gets the old page or the new one, and a crash leaves the old page whole.

  5. Let the server find the file.

    Apache, the web server software, checks for an existing file first, with RewriteCond %{REQUEST_FILENAME} -f. A baked entry matches and requires no PHP. Any other address passes to the panel's router, the code that decides how to handle the request.

The shell has ten slots for supplied content, with rules set out at the top of the shell module's code. The shell supplies the page's single h1, its main heading. The code using the shell supplies each piece of text in full, so the page title and heading appear once each.

In morning light, a finished stone bench on two supports stands beside an orchard path in Swat.

The seat is ready before anyone arrives. Check that publishing leaves a complete page on disk.

Why the pages are files

The Journal publishes pages as files so they need no database or PHP worker and can move to another host. Apache's documentation sets out the same order. In its FallbackResource notes, "Existing files, such as images, css files, and so on, will be served normally", and only a missing path reaches the script.

In this setup, the baked file gives three things. It needs no database, so a published entry keeps serving if MySQL is down. It needs no PHP worker, a server process that runs PHP code, so a busy hour asks nothing of PHP. And it is portable: the folder of HTML files, with its assets, is the published Journal.

There is one exception, and it shapes the code. An unlisted or noindex entry (one marked to stay out of search results) needs an X-Robots-Tag header, an instruction sent with the server's response. Apache's mod_headers could attach it to a static file, but only through a server rule per entry, so the panel keeps those entries on its PHP path and removes the baked file of any entry that gains the mark.

Scheduled entries are the other gap: one due at three in the morning serves through PHP on time, but the archive lists it only after the next rebuild, which the deploy runs as its last step.

441tests in the panel's suite
33PHP files in the panel
18block types the renderer knows
0Composer dependencies

The tests are the panel's brakes. The deploy script runs the migrations, which update the database structure, then the whole test suite on the server. It stops the deploy on a single failure before any page is rebaked. On the bench at commit 6f4bfee5 on 15 November 2026, the suite printed 441 tests.

Custom CMS: when to build one weighs this choice against its running cost, and Cookie consent banner, tested shows one part the panel serves.

At blue hour, a basket of walnuts rests on an orchard wall in Baltistan, with a staked sapling behind it.

Most of the harvest is set out ready. An entry that needs a header stays on the PHP path, tended.

An existing CMS or a small panel

Choose a maintained CMS for several daily editors or client-installed features. Consider a small panel only if one team owns every change. The table puts the common cases side by side.

Source: the documentation cited above, read 15 November 2026, and the studio's own build notes.
If this is true Choose Why
Several people edit every day WordPress, or Statamic Pro roles, revisions and a wide pool of help
The site already builds from Git on a host's build service Decap or Sveltia a publish is a commit, and the host builds the pages
One or two people edit, on shared PHP hosting Grav or Kirby, or a small panel files on disk, and no build service to pay for
A client wants to add features themselves WordPress plugins a client can install without a developer
The public pages must survive the CMS any system that exports Markdown with frontmatter leaving becomes a copy

The last row is the one most worth checking before you commit. This panel's exporter writes every entry, drafts included, as content/journal/<slug>.md. Each file follows Astro's content collection format, its rules for entry files, and sits beside a manifest, a list of the media. Leaving the panel would mean unzipping that archive into an Astro project. For the trade-offs between hosted builders, WordPress and coded sites, the platform comparison covers the second year of each.

A shop faces the same choice with its catalogue; Headless CMS for ecommerce, compared sets out which system should own what.

Run the exit test before you choose any CMS: export everything, put it in a fresh project and see whether the site builds from the export alone.

What the panel gives up

A panel this small depends on one person to keep it working, and I am that person. If more than one person edits your site every day, buy WordPress. There is no plugin directory: features arrive when someone builds them.

The tests carry a cost too. On my Windows bench, 28 of the 441 tests failed, measured on this site on 15 November 2026, each for want of software the bench lacked.

Source: php cms/tests/run.php on the studio's Windows bench at commit 6f4bfee5, 15 November 2026. Security, from sign-in to backups, is the studio's to keep current, where WordPress applies minor and security releases by itself, by its update documentation.
Outcome on the bench Tests
Passed 413
Failed: the Imagick image library is missing 25
Failed: a helper process started without the database driver 3
Total 441

The panel gives an entry a short path, from a file in the repository to a file on the server, and the page a reader receives is that file.

The colophon on how this site is built follows one page of the main site from source to browser.

What is a headless CMS in PHP?

It is a content system written in PHP that stores and edits content and leaves the public pages to another layer. Headless WordPress, Statamic's API features and Cockpit all fit the description.

Can a PHP CMS publish a static site?

It can. Statamic has a static site package, Kirby has a third-party export plugin, and this Journal's panel writes each published, indexable entry as an HTML file. The web server then sends the file without running PHP.

Should I build my own CMS?

Build one only if a single team owns every change and the ready-made systems get in the way of how pages are published. For several daily editors or client-installed features, a maintained system such as WordPress spreads that work across its maintainers.

Meet the studio

Tell us what you need.

My name is , and I am with .

I am here because

I would like to start , with a budget around .

You can reach me at .

Here is the shape of it: (optional)

What matters most

● Before you write

Asked and answered.

What does ShepherdUX do?

ShepherdUX is a web design and SEO studio. We design brand identities, build websites, online shops and custom tools such as CRMs, and get them found on Google and in AI answers through SEO, blog content and press releases. We run Google and Meta ads too. Hire us for one service or the whole job; the work fits best when one team holds all of it.

Does the SEO cover AI search as well as Google?

Yes. We write every page answer-first, with names, facts and figures stated plainly, so Google can rank it and AI assistants like ChatGPT can quote it. In August 2026, 15 of the 131 booking forms on one client’s site came from ChatGPT.

What does a project cost?

Every price is published on our services page. One illustrated blog post is USD 350, an SEO audit USD 900, a logo and brand basics from USD 1,800, a Wix or Squarespace website from USD 2,000 and a five-page custom website from USD 4,800. Monthly SEO plans run from USD 1,200 to USD 4,500. You get a written plan with a fixed price before anything starts.

Can you take over a website someone else built?

Yes, it is one of the most common ways we start. The first step is an audit, not a rebuild: on one site we took over, the audit found Google had never visited twenty-five of its most important pages. What happens next follows from what the audit finds.

Where is the studio based?

We work from Pakistan and the United States, with clients anywhere. Current and recent clients run from Orlando and Tampa Bay to Karachi, and we measure every one the same way, in their own Google Search Console.

How will I know the work is working?

You watch it in numbers you own: your Google Search Console, your analytics and your inbox. The charts in our portfolio come from clients’ real Search Console data, and every report we send you meets the same standard.

Do you use AI to write?

AI tools help us draft and check what we write, the Journal included. Ali Abid, who runs ShepherdUX, sets the rules every entry is written and checked against and holds editorial responsibility for everything we publish. No AI tool supplies a number, a quotation or a client fact: each one traces to a source or a measurement we made.

Or write to pen@shepherdux.com, or send a message on WhatsApp. A person reads these, and answers most of them the same day.

Services

Our services

Thirteen services, each with its starting price. Pick the one you came for.

Not sure which you need? Tell us in a sentence

ShepherdUX