Skip to content
github-actions[bot] edited this page Sep 28, 2026 · 2 revisions

Raster PHP documentation

Raster is a small PHP framework for websites: company sites, landing pages, blogs, newsletters and small web apps. These pages explain how to build and run a site with it. They assume you know HTML and some PHP, and nothing about Raster itself.

Raster in one paragraph

You write your pages as ordinary HTML files. Where a part of the page should come from somewhere else (a database, a list of blog posts, a form result), you wrap it in an HTML comment such as <!-- print.cms.headline -->Hello<!-- /print.cms.headline -->. Raster reads those comments, asks a PHP class for the data, and puts the answer in place of the placeholder. If nothing comes back, the placeholder text stays. Because the comments are invisible in a browser, the same file still works as a static mock-up.

The built-in content management system (CMS) reads the same comments to work out what content your site has. You never write a database schema or configure an admin panel: the HTML is the schema.

What's included

Feature What it gives you Page
Templates HTML files with comment markers, one file per URL Annotations
CMS editable page text, lists of items (news, products, team members), drafts, scheduled posts, revision history The CMS
In-page editor editors change content directly on the page after logging in The in-page editor
Forms validation rules taken from your HTML, messages written in your template, spam and cross-site protection Forms and validation
Accounts log in, sign up, password reset, roles, protected pages Accounts and roles
Email emails written as templates, sent through SMTP or PHP's mail() Sending email
Newsletter double opt-in sign-up, unsubscribe, send any page as an issue Newsletter
Feeds RSS, Atom, JSON, sitemap and text files Feeds, sitemaps and data views
Translations several languages from one set of templates Translations
Static export the whole site as plain files for any static host Static export
Agent tools an MCP server so AI assistants can read and edit the site safely Working with AI agents

Where to start

  1. Getting started: install, run the site on your computer, log in.
  2. How Raster works: the three ideas behind everything else.
  3. Tutorial: your first site: build a page with editable text, a list, your own PHP data and a contact form.

After that, use the reference pages in the sidebar as you need them.

Reference

Other sources

  • AGENTS.md in the repository is the complete technical specification. It is dense and written for AI agents; when this wiki and AGENTS.md disagree, AGENTS.md and the code are right.
  • The demo café in demo/ is a complete site that uses every feature. When you are unsure how something is written, look there. Run it with RASTER_APP=demo php bin/raster serve.
  • CHANGELOG.md lists what changed in each release.

These pages describe Raster 2.0 and the unreleased changes on master as of September 2026.

Clone this wiki locally