# Namecheap cPanel deployment

This release is intended for a subdomain such as `proforma.example.com`. In cPanel, create the subdomain without sharing the main domain root and set its document root to `proforma/public`.

## Upload

Upload and extract `proforma-namecheap.zip` into `/home/CPANEL_USERNAME/proforma`. The complete Laravel project must remain above the public document root.

In **Select PHP Version**, use PHP 8.3 or newer and enable `bcmath`, `ctype`, `curl`, `dom`, `fileinfo`, `filter`, `mbstring`, `mysqli`, `openssl`, `pdo`, `pdo_mysql`, `session`, `tokenizer`, `xml`, and `zip`.

## Terminal commands

```bash
cd ~/proforma
composer install --no-dev --optimize-autoloader
cp .env.namecheap.example .env
php artisan key:generate
```

Edit `.env` in cPanel File Manager and set the real URL, MySQL database, database user, strong password, and SMTP credentials. Then run:

```bash
php artisan migrate --force
php artisan app:create-admin
chmod -R 775 storage bootstrap/cache
php artisan optimize
```

Do not run `db:seed` on a public installation; it creates demonstration identities.

## Cron

Namecheap shared hosting permits a minimum interval of five minutes. In **Advanced > Cron Jobs**, add:

```cron
*/5 * * * * cd /home/CPANEL_USERNAME/proforma && php artisan schedule:run >> /dev/null 2>&1
```

Finally, enable AutoSSL, confirm `https://proforma.example.com/up` responds successfully, and verify `APP_DEBUG=false` and `SESSION_SECURE_COOKIE=true`.
