MonolithCMS: A Complete CMS in One PHP File
MonolithCMS: A Complete CMS in One PHP File
There's a moment every developer knows. You're staring at a node_modules folder that's somehow larger than your entire project, waiting for a build pipeline to finish, wondering how you ended up configuring infrastructure just to publish a blog post. Something went wrong along the way and most of us just quietly accepted it.
The DHH Principle: Simplicity Isn't Laziness
David Heinemeier Hansson - DHH, creator of Ruby on Rails and a tireless voice in the software industry - has spent years making a case that the rest of the industry keeps ignoring: complexity is almost always a choice, and it's usually the wrong one.
His philosophy centers on "convention over configuration," small focused teams, and solutions that are actionable and immediate. He argues that reducing unnecessary complexity doesn't just make software easier to maintain - it makes developers happier, and happy developers build better things.
MonolithCMS is a love letter to that philosophy.
Where WordPress demands dozens of files before you've typed a single word of content, and modern Laravel setups require Composer, npm, .env ceremonies, and a migration ritual that feels like summoning a spirit - MonolithCMS asks for one thing:
index.php
That's it. Upload that single file to any PHP host, visit the URL, and MonolithCMS bootstraps itself. The .htaccess is written automatically. The SQLite database is created on that first request. By the time the page finishes loading, you have a fully running CMS - no setup wizard, no database credentials screen, no installer to delete afterward. The first visit is the installation.
One File to Deploy, Two Files to Migrate
The deployment story for most CMSes involves provisioning servers, configuring databases, managing environment variables, setting up CI/CD, and praying that your staging environment actually resembles production. MonolithCMS's story is uploading a single file.
To start a site: one file. index.php hits the server, you visit it in a browser, and MonolithCMS does the rest - creating the database, writing the .htaccess, initializing everything it needs. There's nothing to run before that moment and nothing to clean up after it.
But what makes this genuinely remarkable is what it means for migration. Once your site has content, you're working with two files: index.php and cms.sqlite. Moving a MonolithCMS site isn't a weekend project involving database dumps, S3 bucket transfers, and environment configuration. It's moving those two files. Your entire application state - content, users, settings, media - travels with them. From one host to another. From local development to production. From a $5/month server to a better $5/month server.
This isn't a toy trick. It's a genuine architectural advantage that compounds over time. No drift between environments. No "works on my machine" debugging sessions. No forgotten environment variables that only surface in production at 2am.
Cache Once, Serve Forever
One of the underappreciated ideas in modern web performance is the power of aggressive, intelligent caching. The conventional wisdom is that caching is complicated - cache invalidation is famously one of the two hard problems in computer science. But that complexity is often self-inflicted.
When your application lives in a single file and your data lives in SQLite right alongside it, caching becomes dramatically simpler. There's no cache-busting across distributed services. No stale cache layers that don't know about each other. You can cache a rendered page once, and serve it forever until the content actually changes - because the content and the cache live in the same place, managed by the same process.
The result is a CMS that can serve pages with the speed of a static site generator while retaining the flexibility of a dynamic system. Cache once. Serve forever. The math is simple because the architecture is simple.
Why Blob and Cache Simplify Everything
Traditional CMS architectures treat media as a problem to be outsourced. Upload a file? That goes to S3. Or a CDN. Or an object storage service with its own credentials, permissions, and pricing model. Need to cache something? Stand up Redis, or Memcached, or configure Varnish. Each of these is a new service to monitor, a new bill to pay, a new failure point to debug at inconvenient hours.
MonolithCMS takes a different approach: SQLite's BLOB storage handles media right alongside your content. There's no separate media server to configure. No IAM role to get wrong. No S3 bucket policy that accidentally exposes your uploads. Your images and files live in the same SQLite database as your posts and pages, which means they migrate for free when you move your two files.
Combine this with the caching strategy above, and you get a complete content delivery solution that requires exactly zero additional infrastructure. The blob is your media storage. The cache is your CDN strategy. The whole environment fits in two files.
For the overwhelming majority of websites - blogs, small business sites, portfolios, documentation, landing pages - this is not a compromise. It's actually better than the alternative, because there are fewer moving parts to break.
The PHP Decision: Pragmatism Over Preference
Here's an honest confession: if I were starting a web project for myself, I'd reach for Ruby on Rails without a second thought. Rails is elegant. Its conventions are deeply considered. DHH's influence is stamped into every layer of the framework, and working with it feels like the software is working with you rather than against you.
But MonolithCMS isn't for me. It's for everyone.
And "everyone" changes the calculus entirely. Think about what a modern deployment actually demands beyond PHP. A Node.js project needs the right Node version - and if your host has 18 and you need 20, you're now in nvm territory before you've written a line of code. Python needs a virtual environment, the right interpreter, pip packages. Ruby needs the runtime, Bundler, and probably rbenv or rvm to manage versions. Go needs a compiled binary that matches your server architecture. Every modern language ecosystem brings a runtime dependency that needs installing, updating, and maintaining.
PHP has none of that overhead on virtually any host on the planet. Upload a .php file, and the server runs it. That's it. No runtime to install. No version manager to configure. No build step to trigger. No apt-get, no brew, no Docker image to pull. The server already speaks PHP - has for decades - and it will just work.
The same goes for SQLite. While other stacks are setting up MySQL users, creating databases, configuring connection strings, and running initial migrations, MonolithCMS's database is just a file. It exists when you copy it. It's ready the moment it lands on the server. There's nothing to initialize, nothing to seed, nothing to grant permissions to.
This means the deployment story for MonolithCMS is genuinely, completely zero-step:
cp index.php /var/www/html/
# then visit the URL - everything else happens automatically
Not "run the deploy script." Not "push to main and let CI handle it." Not "restart the application server." Copy one file. Visit it in a browser. The .htaccess is created. The database is created. You're done. That works over FTP, SFTP, rsync, a file manager in a cPanel dashboard, or dragging and dropping in Transmit. It works for a senior engineer and for someone who has never touched a terminal. The barrier is effectively zero because PHP is already there, waiting, and MonolithCMS takes care of everything else on that very first request.
Choosing PHP for MonolithCMS wasn't a statement about which language is better. It was a statement about who the software is for. When your goal is a CMS that anyone can deploy on any host in five minutes - with no prior knowledge of runtimes, package managers, or server configuration - PHP isn't a limitation. It's the only honest choice. The philosophy of "actionable, immediate, and straightforward" demands that you meet users where they are, not where you wish they were.
Rails will remain my daily driver. But I have genuine respect for the discipline it takes to set aside personal preference in service of a simpler user experience.
What MonolithCMS Gets Right
The conventional CMS wisdom says: add features, add plugins, add integrations, add services. Growth means more. MonolithCMS's wisdom says: if you need all of that, add it - but start with nothing you don't need.
What you get in that single PHP file is not a stripped-down toy. It's a block-based visual page editor, a full blog module with drafts and scheduling, AI content generation with support for OpenAI, Anthropic, and Gemini, a media manager, multi-user access with role-based permissions, multi-factor authentication, and a live theme editor. All of it. No plugins. No marketplace. No upsells.
If your CMS needs a build pipeline, you're solving the wrong problem.
That line - from the MonolithCMS manifesto - is the clearest possible articulation of the philosophy DHH has been advocating for years. Complexity isn't inevitable. It's a series of choices. And every time you add a layer of infrastructure, a configuration file, a deployment step, you're choosing complexity.
MonolithCMS chose otherwise.
Getting Started
Two files. Any PHP 8.1+ host. Five minutes.
Visit monolithcms.com or check out the GitHub repository. It's open source, MIT licensed, and requires no account to get started.
Sometimes the most radical thing you can do is keep it simple.