# AgroExTech — Installation Guide (cPanel)

## Quick path

1. Create MySQL DB + user in cPanel (or reuse existing `agroexte_dbw`).
2. Upload `agroex-deploy.zip` → extract into `public_html`.
3. Open `https://your-domain.com/install.php`.
4. Enter DB credentials, site URL, and first Super Admin account.
5. Wait for success: schema + CMS seed + platform seed (soils, crops, vendors).
6. Delete or rename `install.php`.
7. Log in at `/admin/login`.
8. Open **Admin → Platform** to set the vendor free-registration end date.

## After install

- Public site: `/`
- Soil Advisory: `/advisory`
- Vendors: `/vendors`
- VMS page: `/vms`
- Vendor/Farmer accounts: `/account/register`
- Admin Platform: `/admin/platform`

## Important

- Installer DROPs and recreates tables — only use on a fresh DB or when you intend a full wipe.
- Keep `app/config/config.php` private.
- Ensure `storage/` and `uploads/` are writable.

## Updating without wipe

Backup first. Upload new PHP/assets over `public_html` while preserving `config.php`, `uploads/`, and `storage/`. Apply any new SQL columns carefully via phpMyAdmin if the schema changed.

To apply the HTML-prototype **content** update (settings, hero, eight services, stats, partner blurbs) without wiping the database, run `database/migrate_content.sql` once in phpMyAdmin. It overwrites those CMS rows. Re-enter any custom edits you made in Admin after running it.

To add **maintenance mode** settings on an existing database, run `database/migrate_maintenance.sql` once. Toggle it in Admin → Settings.
