# 🎯 Your cPanel Deployment - Complete Package

## ✨ What's Ready For You

I've prepared **everything** for your cPanel deployment. Here's what you have:

### 📁 Files in Your Project Folder

1. **`.env.cpanel`** 
   - Your complete environment configuration
   - Database: `januspro_lion`
   - User: `januspro_lionpro`
   - RENAME TO `.env` after upload

2. **`setup-after-upload.sh`** ⭐ IMPORTANT
   - Automated setup script
   - Installs dependencies, runs migrations, seeds data
   - Run this after uploading files

3. **`CPANEL_UPLOAD_INSTRUCTIONS.md`**
   - Step-by-step FTP upload guide
   - Troubleshooting tips
   - Configuration checklist

4. **`DEPLOYMENT_GUIDE.md`**
   - Full technical documentation
   - All available commands
   - Advanced configuration

---

## 🚀 Three Simple Steps to Deploy

### Step 1: Upload Files (15 minutes)

**Via FTP Client or cPanel File Manager:**
- Upload all files to `public_html`
- SKIP: `vendor/`, `node_modules/`, `.git/`
- INCLUDE: `.env.cpanel`, `setup-after-upload.sh`

**Upload Size:** ~500MB (with composer files)

### Step 2: Rename .env.cpanel → .env (1 minute)

**Via cPanel File Manager or SSH:**
```bash
ssh januspro@lion.kivulakebreezeguesthouse.com
cd public_html
mv .env.cpanel .env
```

### Step 3: Run Setup Script (5 minutes)

**Via cPanel Terminal or SSH:**
```bash
cd public_html
bash setup-after-upload.sh
```

This will:
- ✅ Set permissions
- ✅ Install PHP dependencies
- ✅ Run database migrations
- ✅ Seed demo data
- ✅ Cache configuration
- ✅ Ready to use!

---

## 🔐 Your Credentials (Safe to Reference)

| Item | Value |
|------|-------|
| **cPanel URL** | lion.kivulakebreezeguesthouse.com:2083 |
| **cPanel Username** | januspro |
| **Domain** | lion.kivulakebreezeguesthouse.com |
| **Database** | januspro_lion |
| **DB User** | januspro_lionpro |
| **DB Password** | Lionpro@2026@! |
| **Document Root** | public_html/public |

---

## ⚠️ Important Setup Notes

### 1. Document Root MUST be `public/`

In cPanel Domains:
- Set document root to: `/home/januspro/public_html/public`
- This is **critical** for Laravel to work
- Laravel serves files from the `public/` folder

### 2. Enable HTTPS

- Go to cPanel **AutoSSL** or **SSL/TLS**
- Install certificate for your domain
- Update `APP_URL` to `https://` in `.env`

### 3. File Permissions

Setup script handles this, but if issues occur:
```bash
chmod -R 777 storage/ bootstrap/cache/
```

---

## 📋 Before You Upload - Verification Checklist

- [ ] You have FTP client (FileZilla, WinSCP) or use cPanel File Manager
- [ ] cPanel credentials ready: `januspro` + password
- [ ] You know the database credentials from cPanel
- [ ] You have SSH access (optional but recommended)
- [ ] Domain `lion.kivulakebreezeguesthouse.com` points to your cPanel server

---

## 🔍 After Upload - Verification Checklist

Once files are uploaded and setup script runs:

- [ ] Visit: `https://lion.kivulakebreezeguesthouse.com`
- [ ] Page loads without error (may show login screen)
- [ ] Check logs: `tail storage/logs/laravel.log`
- [ ] No 500 errors in browser or logs
- [ ] Database shows data (if seeded)
- [ ] Demo credentials work (if seeded)

---

## 🆘 If Something Goes Wrong

### Quick Troubleshooting

1. **Check Error Logs:**
   ```bash
   ssh januspro@lion.kivulakebreezeguesthouse.com
   cd public_html
   tail -f storage/logs/laravel.log
   ```

2. **Clear Cache:**
   ```bash
   php artisan cache:clear
   php artisan config:clear
   ```

3. **Verify Setup:**
   ```bash
   php artisan status
   ```

4. **Check Document Root:**
   - Ensure cPanel points to `public_html/public` folder
   - Not just `public_html/`

5. **Verify .env:**
   ```bash
   grep DB_ .env
   ```
   Should match your cPanel database credentials

### Common Issues & Fixes

| Issue | Cause | Fix |
|-------|-------|-----|
| 500 Error | Document root wrong | Set to `public_html/public` in cPanel |
| Database Error | Credentials wrong | Check `.env` matches cPanel DB settings |
| Permission Denied | Wrong file permissions | Run `chmod -R 777 storage/` |
| Page Not Found | Laravel routing issue | Ensure `.htaccess` exists in `public/` |
| Composer Failed | Memory limit | Run `COMPOSER_MEMORY_LIMIT=-1 composer install` |

---

## 📚 Documentation Files Ready

All these are in your project folder:

1. **CPANEL_UPLOAD_INSTRUCTIONS.md** ← START HERE
   - Detailed FTP upload steps
   - Document root configuration
   - SSL setup

2. **setup-after-upload.sh** ← RUN THIS
   - Automated deployment
   - Database setup
   - Configuration caching

3. **DEPLOYMENT_GUIDE.md** ← REFERENCE
   - Full technical details
   - All available commands
   - Advanced topics

4. **.env.cpanel** ← YOUR CONFIG
   - Ready to use
   - Rename to `.env` after upload

---

## 🎬 Next Steps

1. **Read:** `CPANEL_UPLOAD_INSTRUCTIONS.md`
2. **Upload:** All project files via FTP
3. **Rename:** `.env.cpanel` → `.env`
4. **Execute:** `bash setup-after-upload.sh`
5. **Configure:** Set document root to `public_html/public`
6. **Enable:** HTTPS/SSL certificate
7. **Test:** Visit your domain
8. **Monitor:** Check logs for errors

---

## 💡 Pro Tips

- **Keep a backup:** Download your files before uploading
- **Test locally first:** Run on localhost to verify functionality
- **Monitor logs:** Always watch `storage/logs/laravel.log` for issues
- **Cache commands:** After any code change, run `php artisan cache:clear`
- **Database backup:** Regularly backup your MySQL database from cPanel

---

## 📞 Support Resources

- **Laravel Docs:** https://laravel.com/docs
- **cPanel Documentation:** https://docs.cpanel.net
- **Error Logs:** `storage/logs/laravel.log`

---

## ✅ You're Ready!

Everything is prepared. All you need to do is:

1. Upload the files
2. Run the setup script
3. Access your live application

**Your app will be live at:** `https://lion.kivulakebreezeguesthouse.com`

---

**Good luck! 🚀**
