mini-php-webcomic is a minimal, responsive webcomic template built with PHP and MariaDB. It was created for my comic, Academy 118.
Not into PHP? Try mini-hugo-webcomic!
Make sure you have the latest version of PHP installed. Then, clone this repository:
git clone https://github.com/AvaLovelace1/mini-php-webcomic.gitPlace the repository contents into the root directory of your web server.
mini-php-webcomic stores comics in an SQL database. I recommend using MariaDB for database management.
After installing MariaDB, start the MariaDB server. Then, enter the MariaDB shell by running:
mysqlCreate a new database for the webcomic by running the following command in the MariaDB shell:
CREATE DATABASE miniwebcomic;Then, create a new user with your desired username and password, and grant it all privileges on the database:
CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON miniwebcomic.* TO 'username'@'localhost';Import the initial database schema by running the following command in the command line:
mysql -u [username] -p miniwebcomic < miniwebcomic.sql
Finally, change the username and password fields in the file php/database.php to your MariaDB username and
password.
This template’s layout and styling are intentionally kept bare-bones to allow for easy customization. You can modify
the site to your heart’s content by editing the .php and css/style.css files.
Comics are organized into episodes. Each episode contains one or more comic pages.
Add new comic pages and episodes by INSERTing rows into the comics and episodes tables in the
miniwebcomic database, respectively. Comics will auto-publish based on the given publish_date.
Comic image files should be stored in the img/comic directory. Image filenames follow the format
[filename]_[pageNumber].[extension]. The
pageNumber must be padded with leading zeros to a length of 3.

