Repository navigation
Home
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.
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.
| 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 |
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 |
- Getting started: install, run the site on your computer, log in.
- How Raster works: the three ideas behind everything else.
- 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.
- Building pages: Pages and URLs · Annotations · Models · The database · Events
- Content: The CMS · The in-page editor · Pagination · Feeds, sitemaps and data views · Translations
- Visitors: Forms and validation · Accounts and roles · Sending email · Newsletter
- Running a site: Settings and environments · Command line · Deploying to production · Static export · Updating Raster · Security
- Going further: Working with AI agents · Extending Raster · Best practices · Troubleshooting · Glossary
-
AGENTS.mdin the repository is the complete technical specification. It is dense and written for AI agents; when this wiki andAGENTS.mddisagree,AGENTS.mdand 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 withRASTER_APP=demo php bin/raster serve. -
CHANGELOG.mdlists what changed in each release.
These pages describe Raster 2.0 and the unreleased changes on master as of September 2026.
Raster PHP · Repository · AGENTS.md (full specification) · Changelog · Demo café
Start here
Building pages
Content
Visitors
Running a site
- Settings and environments
- Command line
- Deploying to production
- Static export
- Updating Raster
- Security
More