# Deploy on OVH Perso (shared hosting)

## 1. Export local database
```bash
mysqldump -u root -p parfum > parfum.sql
```

## 2. Create OVH database
- OVH Manager → **Hébergement** → **Bases de données**
- Create MySQL database
- Save the **database name, username, password, host** (ex: `yourname.mysql.db`)

## 3. Upload files via FTP
- FTP with FileZilla to your OVH space
- **Delete** default `www/` folder
- Upload the entire project (except `node_modules/`)
- Set document root: OVH Manager → **Hébergement** → **Multisite** → edit domain → Root directory = `public`

## 4. Create `.env` at root
```
APP_NAME=Parfum
APP_ENV=production
APP_DEBUG=false
APP_URL=https://votre-domaine.com

DB_CONNECTION=mysql
DB_HOST=yourname.mysql.db
DB_PORT=3306
DB_DATABASE=your_db_name
DB_USERNAME=your_db_user
DB_PASSWORD=your_db_password

SESSION_DRIVER=database
SESSION_DOMAIN=.votre-domaine.com
```

> ⚠️ The `APP_KEY` must stay the same as your local `.env`

## 5. Import database
OVH Manager → phpMyAdmin → select your DB → Import → choose `parfum.sql`

## 6. PHP version
OVH Manager → **Hébergement** → **Configuration** → PHP 8.3
Enable: `fileinfo`, `gd`, `mbstring`, `pdo_mysql`

## 7. Composer dependencies
**If you have SSH**: `ssh` then `cd / && composer install --no-dev`
**If no SSH**: run locally first, then upload:
```bash
composer install --no-dev --optimize-autoloader
```
Then upload the `vendor/` folder via FTP.

## 8. Storage link & cache
After upload, run these via OVH **Cron** or **Scripts**:
```bash
php artisan storage:link
php artisan migrate
php artisan optimize:clear
```

## 9. Permissions
Set `storage/` and `bootstrap/cache/` to **755** via FTP (right-click → permissions).

## 10. Done !
Your site should be live at `https://votre-domaine.com`
