Skip to main content
NostalgiaPHP
Home
About
  • Components
  • Blink
  • Fetch
  • Slider
  • REST API
BlogDoxSearchContact
Admin
  • Sitemap
  • Robots
GitHub
  1. Home
  2. Dox
  3. Getting Started
Sep 12, 2025

Getting Started with NostalgiaPHP

NostalgiaPHP is a caveman-simple, file-based CMS.

No database. No build step. No framework. Just drop in some Markdown files, and you’re publishing.


Requirements

  • PHP 7.4+ (works on modern PHP versions)
  • A web server with rewrites enabled (Apache .htaccess or Nginx try_files)
  • That’s it. No Node, no npm, no Composer, no database.

Quickstart (local dev)

  1. Clone or download the project:
git clone https://github.com/bmehder/NostalgiaPHP.git
cd NostalgiaPHP
  1. Start PHP’s built-in server:
php -S localhost:8000
  1. Open http://localhost:8000 in your browser.

Project Structure

nostalgia-php/

│── routes/           # routing logic (pages, collections, admin, etc.)
├── content/
│   ├── pages/        # static pages (Markdown)
│   └── collections/  # groups like blog, docs
├── partials/         # header, footer, hero, card, etc.
├── templates/        # layouts (main, sidebar, admin)
├── static/           # css, images, js
├── config.php        # site settings
├── functions.php     # helpers
├── index.php         # router entry point
└── ...other files    # htaccess, dockerfile, Parsedown, README
  • Pages live in content/pages/ as .md.
    Example: about.md → /about
  • Collections are folders under content/collections/.
    Example: content/collections/blog/hello-world.md → /blog/hello-world
  • Partials (partials/) are reusable chunks.
  • Templates (templates/) define page layouts.
  • Routes (app/routes/) handle how requests map to content.

First Edits

  1. Change the site name in config.php:
'site' => [
  'name' => 'My First NostalgiaPHP Site',
  'base_url' => '/',
  'timezone' => 'America/New_York',
],
  1. Edit content/pages/about/index.md to change the about text.

  2. Add a new page:

  • Create content/pages/sample/index.md:
---
title: Sample Page
description: Learn more about our team.
---

# Sample Page

We’re building simple sites with simple tools.
  • Visit http://localhost:8000/sample.
  1. Add a new collection:

Edit config.php and add a block like:

'collections' => [
  'team' => [
    'permalink' => '/team/{slug}',
    'list_url'  => '/team',
    'sort'      => ['date', 'desc'],
  ],
],

Then add items under content/collections/team/.


Deployment

  • Apache: use the included .htaccess for pretty URLs.
  • Nginx: add try_files $uri $uri/ /index.php?$query_string;.
  • Permissions: make sure directories are 755 and files are 644.

✅ That’s it — edit Markdown, refresh the browser, and your site updates.

Explore

Recent Items

  • You Might Not Want to Use NostalgiaPHP
    Oct 8, 2025
  • Understanding the Styles
    Oct 5, 2025
  • Appear Animations
    Oct 2, 2025
  • Nosty CLI — Your New Best Friend
    Sep 28, 2025
  • Introducing the NostalgiaPHP REST API
    Sep 27, 2025

Tags

  • animation (1)
  • api (1)
  • blink (1)
  • css (1)
  • intersectionobserver (1)
  • js (1)
  • json (1)
  • nostalgia (2)
  • php (3)
  • reactivity (1)
  • rest (1)
  • retro (3)
  • simplicity (3)
  • slank (1)
© 2025 NostalgiaPHP. All rights reserved. ⬆ Back to Top