Skip to main content

Requirements

Before installing MINI, ensure your environment meets these requirements:

PHP

PHP 5.3.0 or higher (tested with PHP 5.6, 7.x, and 8.0)

MySQL

MySQL or MariaDB database server

Apache mod_rewrite

Apache with mod_rewrite enabled for clean URLs

Composer

Optional: Composer for dependency management
If you cannot enable mod_rewrite, check out TINY, a version of MINI that works without mod_rewrite.

Installation Methods

Choose the installation method that best fits your needs:

Manual Installation

The standard way to install MINI on any system.
1

Clone or Download MINI

Clone the repository or download the ZIP file:
git clone https://github.com/panique/mini.git
cd mini
Or download and extract the ZIP file from GitHub.
2

Configure Database

Edit the database credentials in application/config/config.php:
application/config/config.php
define('DB_TYPE', 'mysql');
define('DB_HOST', '127.0.0.1');
define('DB_NAME', 'mini');
define('DB_USER', 'root');
define('DB_PASS', 'your_password');
define('DB_CHARSET', 'utf8');
Never commit database credentials to version control. Consider using environment variables for production.
3

Create Database

Create the database and import the SQL file:
mysql -u root -p
CREATE DATABASE mini;
USE mini;
source _install/01-create-database.sql;
Or use PHPMyAdmin to import the .sql file from the _install/ folder.
4

Enable mod_rewrite

Ensure Apache’s mod_rewrite module is enabled:Ubuntu/Debian:
sudo a2enmod rewrite
sudo service apache2 restart
Check if enabled:
apache2ctl -M | grep rewrite
You should see: rewrite_module (shared)
5

Configure Apache

Make sure your Apache configuration allows .htaccess overrides:
<Directory /var/www/html>
    AllowOverride All
</Directory>
Restart Apache after changes:
sudo service apache2 restart
6

Set Permissions

Ensure proper permissions for the web server:
sudo chown -R www-data:www-data /path/to/mini
sudo chmod -R 755 /path/to/mini
7

Verify Installation

Open your browser and navigate to:
http://localhost/mini
You should see the MINI welcome page with example links.

Server-Specific Configuration

nginx Configuration

If you’re using nginx instead of Apache:
nginx.conf
server {
    server_name default_server _;   # Listen to any servername
    listen      [::]:80;
    listen      80;

    root /var/www/html/myproject/public;

    location / {
        index index.php;
        try_files /$uri /$uri/ /index.php?url=$uri;
    }

    location ~ \.(php)$ {
        fastcgi_pass   unix:/var/run/php5-fpm.sock;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }
}
For detailed nginx setup discussion, see this GitHub issue.

Enabling mod_rewrite on Different Platforms

sudo a2enmod rewrite
sudo service apache2 restart
Guide: Enable mod_rewrite on Ubuntu
  1. Open httpd.conf in the Apache config folder
  2. Find the line: #LoadModule rewrite_module modules/mod_rewrite.so
  3. Remove the # to uncomment it
  4. Restart Apache
Guide: Enable mod_rewrite in XAMPP
  1. Open MAMP preferences
  2. Go to Apache settings
  3. Enable mod_rewrite
  4. Restart servers
Guide: Get .htaccess to work on MAMP

Verification

Verify your installation is working correctly:
1

Check Home Page

Navigate to your MINI installation. You should see the welcome page.
2

Test Clean URLs

Try accessing: http://localhost/mini/home/exampleOneIf you see a page without a 404 error, clean URLs are working.
3

Test Database

Click on “Songs” in the navigation. If you see the songs list, the database connection is working.
4

Test CRUD Operations

Try adding, editing, and deleting a song to verify all CRUD operations work.

Troubleshooting

Cause: mod_rewrite is not enabled or .htaccess is not being read.Solution:
  1. Verify mod_rewrite is enabled: apache2ctl -M | grep rewrite
  2. Check Apache config allows .htaccess overrides: AllowOverride All
  3. Ensure .htaccess file exists in the public/ folder
  4. Restart Apache
Cause: Incorrect database credentials or MySQL not running.Solution:
  1. Verify MySQL is running: sudo service mysql status
  2. Check credentials in application/config/config.php
  3. Ensure the database exists: mysql -u root -p -e "SHOW DATABASES;"
  4. Verify the user has access to the database
Cause: PHP error with error reporting disabled.Solution:
  1. Enable error reporting in application/config/config.php:
    define('ENVIRONMENT', 'development');
    
  2. Check PHP error logs: tail -f /var/log/apache2/error.log
  3. Verify PHP version: php -v (must be 5.3.0+)
Cause: Incorrect file permissions.Solution:
sudo chown -R www-data:www-data /path/to/mini
sudo chmod -R 755 /path/to/mini

Sub-folder Installation

MINI works perfectly in a sub-folder without any additional configuration:
http://localhost/myproject/mini
The framework automatically detects the sub-folder and adjusts URLs accordingly.

Next Steps

Quick Start Guide

Learn how to build your first controller and view

Build docs developers (and LLMs) love