# Strong Tower cPanel Deployment

Production domain: https://www.compassionatecareusa.com

## Requirements

- PHP 8.0+ with PDO MySQL, fileinfo, ZipArchive, and mbstring recommended.
- MySQL 5.7+ or MariaDB 10.2+.
- Apache with `mod_rewrite`; `mod_headers` recommended.
- Writable directories: `cache/`, `logs/`, `uploads/resumes/`.

Recommended PHP limits:

- `memory_limit`: 256M
- `upload_max_filesize`: 8M
- `post_max_size`: 10M
- `max_execution_time`: 60

## Install

1. Upload the contents of `strong-tower-cpanel-production-ready.zip` into the domain document root for `www.compassionatecareusa.com`.
2. Create a MySQL database and user in cPanel.
3. Import `database.sql` through phpMyAdmin or cPanel's MySQL import tool.
4. Set database credentials using hosting environment variables when available:
   - `STHHS_DB_HOST`
   - `STHHS_DB_NAME`
   - `STHHS_DB_USER`
   - `STHHS_DB_PASS`
   - `STHHS_BASE_URL=https://www.compassionatecareusa.com`
5. If environment variables are unavailable, update the fallback constants in `config.php` after upload.
6. Create the first administrator with the SQL process below.

## First Admin

No default admin password is shipped.

Generate a secure password hash locally or from cPanel Terminal:

```bash
php -r "echo password_hash('replace-with-a-private-password', PASSWORD_DEFAULT), PHP_EOL;"
```

Insert the admin:

```sql
INSERT INTO admins (username, password_hash, email, role, active)
VALUES ('admin', 'PASTE_HASH_HERE', 'admin@example.com', 'admin', 1);
```

Then sign in at `/admin/login.php`.

## Local XAMPP

The same codebase supports local XAMPP at:

```text
http://localhost/strong-tower/
```

Do not add `RewriteBase /strong-tower/` to the production package. The current rewrite rules are relative and support both the XAMPP subfolder and production document root.

