NEXTUK Consultant — cPanel / shared hosting install
====================================================

REQUIREMENTS
- cPanel shared hosting with PHP 8.1+ (MultiPHP Manager)
- MySQL / MariaDB (create the empty database in cPanel)
- SSL (AutoSSL / Let’s Encrypt)
- No SSH required — use /install.php

----------------------------------------
STEP 1 — Extract INTO public_html (read carefully)
----------------------------------------
The zip is a FLAT package (index.php next to app/). It must NOT sit inside
another folder named public_html.

1. cPanel → File Manager → open public_html
2. Upload nextukconsultant-cpanel.zip → Extract
3. Open the folder nextukconsultant-cpanel
4. Select EVERYTHING inside it (index.php, install.php, app, config, …)
5. Move those items UP into public_html
6. Delete the empty nextukconsultant-cpanel folder and the zip

Correct layout:
  /home/USERNAME/public_html/index.php
  /home/USERNAME/public_html/install.php
  /home/USERNAME/public_html/app/
  /home/USERNAME/public_html/config/
  /home/USERNAME/public_html/database/
  /home/USERNAME/public_html/storage/

Wrong (causes https://domain.com/public_html/install.php):
  /home/USERNAME/public_html/public_html/index.php
  or leaving files only inside nextukconsultant-cpanel/

----------------------------------------
STEP 2 — PHP version and extensions
----------------------------------------
1. MultiPHP Manager → PHP 8.1 / 8.2 / 8.3 for the domain
2. Enable extensions: pdo, pdo_mysql, mbstring, openssl, json, fileinfo, curl, gd, zip

----------------------------------------
STEP 3 — Create MySQL database in cPanel
----------------------------------------
1. MySQL® Databases → create database + user
2. Add user to database with ALL PRIVILEGES
3. Note host (usually localhost), full DB name, username, password

----------------------------------------
STEP 4 — Web installer
----------------------------------------
1. Visit https://yourdomain.com/install.php
   (NOT https://yourdomain.com/public_html/install.php)
2. Site URL = https://yourdomain.com
3. URL base path = leave EMPTY
4. Enter MySQL details + admin email/password
5. Install
6. Delete install.php from public_html after success

----------------------------------------
STEP 5 — Permissions, SSL, cron
----------------------------------------
- storage/ (and subfolders) → 755 or 775
- SSL/TLS Status → AutoSSL
- Cron daily:
    /usr/local/bin/php /home/USERNAME/public_html/cron/reminders.php

----------------------------------------
SECURITY
----------------------------------------
- app/, config/, database/, storage/, cron/ ship with deny .htaccess
- Delete install.php after install
- Change demo staff passwords after first login

----------------------------------------
TROUBLESHOOTING
----------------------------------------
URL has /public_html/     → Move files up so index.php is directly in public_html
404 on every page         → .htaccess present; RewriteBase /
DB connection failed      → Exact cPanel DB name/user + ALL PRIVILEGES
Missing PDO MySQL         → Enable pdo_mysql in Select PHP Version
