This guide covers everything you need to get Simple Website Framework up and running, from server requirements to your first page.
Server Requirements
Before you begin, make sure your server meets these requirements:
- PHP 7.4 or higher (PHP 8.x recommended)
- Apache with
mod_rewriteenabled - AllowOverride All set for your document root (required for
.htaccessto function)
The framework does not require a database, Composer, or any package manager. Everything it needs is bundled in the repository.
Installation
1. Clone or download the repository
Place the files in your web server's document root, or in a subdirectory if you prefer.
git clone https://github.com/ScarylePoo/simple-website-framework.git
2. Copy and configure config.php
A config-example.php is provided in the config/ folder. Copy it to config.php and open it for editing:
cp config/config-example.php config/config.php
At minimum, set the following values before the site will work correctly:
$WebsiteURL— your domain name, without protocol (e.g.example.com)$SSL— set totrueif your site uses HTTPS$ForceWWW— set totrueto force thewww.prefix,falseto strip it
See the Configuration Reference for a full breakdown of every available option.
3. Verify Apache is configured correctly
The framework relies on .htaccess to route all clean URLs through index.php. If you are getting 404 errors on every page, mod_rewrite is likely not enabled or AllowOverride is not set to All.
On Ubuntu/Debian you can enable mod_rewrite with:
sudo a2enmod rewrite
sudo systemctl restart apache2
4. Set file permissions
The web server needs read access to all files. If you intend to use HTML caching, the web server also needs write access to the root directory so it can create cache files:
chmod 755 /path/to/your/site
5. Visit your site
If everything is configured correctly, navigating to your domain should display the home page. If you see a blank page or errors, check your PHP error log.
Development vs Production
The framework ships with caching disabled by default, which is correct for development. Before deploying to production, enable caching in config.php:
$enableHTMLCacheServe = true;
See the Caching page for full details.
Directory Structure
Here is a quick overview of what each folder does:
| Path | Purpose |
|---|---|
config/ |
Site configuration |
css/ |
Global CSS (normalize, base, flex grid) |
images/ |
Site-wide images (favicon, hero, defaults) |
includes/ |
Bundled JS libraries (jQuery) |
pages/ |
All page content as .html files |
pages/posts/ |
Blog post content |
pages/footer/ |
Footer column content |
plugins/ |
Plugin files and plugins.php loader |
required/ |
Core framework PHP files (do not edit) |
themes/ |
Theme folders |
themes/skeleton/ |
The default starter theme |
extras/ |
Optional tools not part of the core framework |
Next Steps
- Configuration Reference — every config variable explained
- Creating Pages — how to add content
- Theme System — how to customise the look and feel