Skip to content
An introductory example of how to build a simple and minimal website built with PHP.
Branch: master
Clone or download
banago Version 3.0 is ready.
- content files moved to .phtml extension
- PHP functions and config file moved to includes folder
- site_url introduced to solve the URL issues
- content files are not loaded through "file_get_contents" instead of "include"
- styles moved to separate stylesheet file
- PHP introductory course linked in readme
- renamed main run() file to init()
- rewrote camelCase() functions to snake_case()
- introduced error reporting

Signed-off-by: Baki Goxhaj <>
Latest commit a72792b Nov 18, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
content Verion 3.0 release candidate: Nov 18, 2018
includes Version 3.0 is ready. Nov 18, 2018
template Version 3.0 is ready. Nov 18, 2018
.gitignore Added PHP-CS-Fixer config to ignred files Nov 18, 2018
.htaccess v2.0 Improved and expaned. Pretty links introduced. May 1, 2017
index.php Version 3.0 is ready. Nov 18, 2018 Readme cleanup Nov 18, 2018

Simple PHP Website

I put together this project while introducing a friend of mine to PHP. I decided to clean it up a bit and put it on Github so anyone new to PHP can have a taste of a very simple and minimal website built with PHP.

This project is meant for beginners. I've intentionally kept it minimal while introducing some separation of concerns.


I've made sure to make the running of this little site as simple as possible. There are only to steps go take:

  1. Download the project to the desired directory on your computer
  2. Populate the site_url field in includes/config.php with the desird site url.


The project covers these programming concepts:

  • Variables
  • Arrays
  • Functions
  • Pretty links (/about) with fallback to query string (?page=about)
  • Basic example of separation of concerns (functionality, template, content)

If you have any questions or recommendations for the project, please create an issue or hit me up on Twitter @banago.

To help you take your knowledge of PHP to the next level, I've personally hunt down what I deem to be the best introductory course on PHP out there. I wish this course existed when I started learing PHP. Check it out on Udemy: PHP for Beginners Course.



You can’t perform that action at this time.