Skip to content

A professional, reusable web installer for any PHP application. Simplify your deployment process with an intuitive step-by-step installation wizard.

License

Notifications You must be signed in to change notification settings

jmrashed/php-installer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PHP Installer Package

License: MIT PHP Version GitHub release

A professional, reusable web installer for any PHP application. Simplify your deployment process with an intuitive step-by-step installation wizard.

✨ Features

  • System Requirements Check - Validates PHP version, extensions, and directory permissions
  • Database Setup - Automated database creation and schema import
  • Configuration Management - Generates .env and config files from templates
  • Admin Account Creation - Optional administrator user setup
  • Installation Lock - Prevents reinstallation after completion
  • CSRF Protection - Secure form handling
  • Responsive UI - Bootstrap-powered interface
  • Error Handling - Comprehensive validation and user feedback

πŸš€ Quick Start

Installation

# Clone the repository
git clone git@github.com:jmrashed/php-installer.git

# Or download and extract to your project
wget https://github.com/jmrashed/php-installer/archive/main.zip

Integration

  1. Copy the php-installer folder to your project root
  2. Create your database schema file at database/db.sql
  3. Configure installer settings in config/installer.php
  4. Access via browser: http://yourdomain.com/php-installer/

πŸ“‹ Requirements

  • PHP 7.4 or higher
  • PDO extension
  • MySQL/MariaDB database
  • Web server (Apache/Nginx)

πŸ› οΈ Configuration

Screenshot

Welcome

License

System Check

DB Config

DB Import

App Config

Admin Account

Finish

Success

Basic Setup

Edit config/installer.php:

<?php
return [
    'app_name' => 'Your Application',
    'version' => '1.0.0',
    'php_version' => '7.4',
    'required_extensions' => ['pdo_mysql', 'curl', 'mbstring'],
    'writable_dirs' => ['config', 'storage', 'uploads'],
    'database_file' => __DIR__ . '/../database/db.sql'
];

Database Schema

Place your SQL schema in database/db.sql:

CREATE TABLE users (
    id INT AUTO_INCREMENT PRIMARY KEY,
    username VARCHAR(50) UNIQUE NOT NULL,
    email VARCHAR(100) UNIQUE NOT NULL,
    password VARCHAR(255) NOT NULL,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

πŸ“ Directory Structure

php-installer/
β”œβ”€β”€ config/
β”‚   └── installer.php          # Configuration settings
β”œβ”€β”€ database/
β”‚   └── db.sql                 # Database schema
β”œβ”€β”€ public/
β”‚   └── index.php              # Entry point
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ Core/                  # Core installer classes
β”‚   β”œβ”€β”€ Controllers/           # Request handlers
β”‚   β”œβ”€β”€ Views/                 # UI templates
β”‚   β”œβ”€β”€ Assets/                # CSS, JS, images
β”‚   └── Templates/             # Config templates
└── storage/
    β”œβ”€β”€ logs/                  # Installation logs
    └── installer.lock         # Installation lock file

🎯 Usage Example

For Laravel Projects

// config/installer.php
return [
    'app_name' => 'Laravel Application',
    'required_extensions' => ['pdo_mysql', 'mbstring', 'openssl', 'tokenizer'],
    'writable_dirs' => ['storage', 'bootstrap/cache'],
];

For Custom PHP Projects

// config/installer.php
return [
    'app_name' => 'Custom PHP App',
    'required_extensions' => ['pdo_mysql', 'curl', 'gd'],
    'writable_dirs' => ['uploads', 'cache', 'logs'],
];

πŸ”§ Customization

Custom Installation Steps

Extend the installer by modifying src/Core/Installer.php:

private $steps = [
    'welcome',
    'license',
    'system_check',
    'db_config',
    'db_import',
    'app_config',
    'admin_account',
    'custom_step',    // Add your custom step
    'finish'
];

Custom Templates

Create custom config templates in src/Templates/:

  • config_template.php - Application configuration
  • env_template.php - Environment variables

πŸ“‹ Changelog

See CHANGELOG.md for a detailed list of changes and version history.

🀝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ‘¨β€πŸ’» Author

Md Rasheduzzaman
Full-Stack Engineer & Technical Project Manager

πŸ™ Acknowledgments

  • Bootstrap for the responsive UI framework
  • PHP community for best practices and standards

πŸ“Š Stats

GitHub stars GitHub forks GitHub issues


⭐ Star this repository if it helped you!

About

A professional, reusable web installer for any PHP application. Simplify your deployment process with an intuitive step-by-step installation wizard.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published