A lightweight, file-based Content Management System without database.
FILES STILL IN TESTING BUT COMING in 2nd week of January 2025\
No database server required (Flat-File CMS)
Responsive Design with Tailwind CSS
Simple navigation with main and side menu
Hierarchical page structure with parent-child relationships
Support for external links
PHP code in pages possible
User-friendly backend
Markdown support (optional)
Mobile-friendly backend
Lightweight (~100KB core size)\
PHP 7.4+ (recommended: PHP 8+)
Apache2 or Nginx webserver
Tailwind CSS (via CDN)
CodeMirror for syntax highlighting (via CDN)\
Upload all files to your webserver directory.
mkdir content
touch config.json
touch pages.json
touch nav-main.html
touch nav-side.html
Set owner (replace www-data with your webserver user)
chown -R www-data:www-data
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
chmod 664 config.json
chmod 664 pages.json`
chmod 664 nav-main.html`
chmod 664 nav-side.html`
chmod 664 credentials.json`
chmod 775 content
chmod 664 content/*.html
chmod 664 content/*.php
<?php
// Define initial password
$initialPassword = 'YourSecurePassword123!'; // Change this!
$username = 'admin';
$credentials = [
'username' => $username,
'password' => password_hash($initialPassword, PASSWORD_DEFAULT)
];
file_put_contents('credentials.json', json_encode($credentials, JSON_PRETTY_PRINT));
echo "Credentials created successfully!<br>";
echo "Username: " . $username . "<br>";
echo "Password: " . $initialPassword . "<br>";
echo "<br>Please note these credentials and delete this script immediately!";
?>
Access cred.php in your browser
Note down the credentials
Delete cred.php immediately
Change password after first login\
{
"site_title": "Your Website",
"site_name": "BareCMS",
"site_url": "https://your-domain.com",
"site_icon": "/logo.png"
}
Change default password immediately
Enable HTTPS
Set secure file permissions
Protect sensitive JSON files
Keep PHP up to date
Create regular backups\
location ~ /\. {
deny all;
}
location ~* \.(json)$ {
deny all;
}
location = /config.json {
deny all;
}
location = /credentials.json {
deny all;
}
location = /pages.json {
deny all;
}"
<FilesMatch "\.(json)$">
Order Deny,Allow
Deny from all
</FilesMatch>
<Files "backend.php">
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
# Add your IP address here
Allow from your.ip.address
</Files>
In the backend, you can include PHP code in your pages. The system automatically detects PHP code and saves the file with the correct extension.
All JSON files
The content directory
Custom templates
To add a layer of security it would be best practice to remove backend.php and credentials.json from webroot, when you are not managing your site.
No multi-user management
No integrated image management
No content versioning\
MIT License
Made with ♥ by relayted.de