================================================================================
MULTI CLASH - CPANEL DEPLOYMENT GUIDE
================================================================================

1. UPLOAD & EXTRACT FILES
--------------------------------------------------------------------------------
- Log in to your cPanel.
- Open "File Manager" and navigate to "public_html" (or your subdomain directory).
- Upload the zip file and click "Extract".
- Ensure that hidden dotfiles are visible in cPanel (Click Settings top-right -> check "Show Hidden Files (dotfiles)").
- Confirm that both `.htaccess` and `.env` are present in the directory root.

2. IMPORT THE DATABASE
--------------------------------------------------------------------------------
- In cPanel, go to "MySQL Databases":
    a. Create a new database (e.g., youruser_multiclash).
    b. Create a new MySQL user and set a strong password.
    c. Add the user to the database with "ALL PRIVILEGES".
- Go to "phpMyAdmin" in cPanel:
    a. Select your newly created database.
    b. Click "Import" at the top.
    c. Choose the file `database.sql` (or `multiclash_database.sql`) from the root.
    d. Click "Go" to import all tables and data.

3. CONFIGURE .env
--------------------------------------------------------------------------------
- Open the `.env` file in cPanel File Manager (or use code editor):
    - Update `APP_BASE_URL` with your live domain:
        APP_BASE_URL=https://yourdomain.com/
        (Include trailing slash)
    - Update Database settings with your cPanel database credentials:
        DB_HOST=localhost
        DB_NAME=youruser_multiclash
        DB_USER=youruser_dbuser
        DB_PASS=youruser_dbpassword
    - Enter your ZapUPI Key & optional Cashier ID (if using ZapUPI gateway):
        ZAP_KEY=your_zap_key
        ZAP_CASHIER_ID=your_cashier_id (optional, for multi-cashier setups)
- Save changes.

4. PHP VERSION & EXTENSIONS
--------------------------------------------------------------------------------
- Recommended PHP Version: PHP 7.4, 8.0, 8.1, or 8.2.
- Required PHP Extensions (usually enabled by default in cPanel):
    - mysqli, pdo_mysql, curl, gd, mbstring, openssl, json, zip.

5. APACHE & REWRITE RULES (.htaccess)
--------------------------------------------------------------------------------
- The included `.htaccess` file is pre-configured with:
    - CodeIgniter URL rewrites (clean URLs without index.php)
    - Sensitive file protection (blocks direct browser access to `.env` and `.git`)
    - Browser caching and Gzip compression for high performance.

Everything is pre-configured and ready to run!
================================================================================
