#RuralPointADVANCE - cPanel Deployment Checklist

## ✅ Configuration Details

### Domain
- **Primary Domain**: https://branchbusinessadvance.co.ke/
- **WWW Domain**: https://www.branchbusinessadvance.co.ke/

### Database Configuration
- **Database Name**: `acbptxvs_ruralpoint_system`
- **Database User**: `acbptxvs_phin`
- **Database Password**: `5;)8.H8aTG8%p_]`
- **Database Host**: `localhost`
- **Database Port**: `3306`

### Django Configuration
- **Secret Key**: `(W6B1[bCEAu,1wA[dz7^`
- **Settings File**: `branch_system/settings_production.py`
- **WSGI File**: `passenger_wsgi.py`

## 🚀 Deployment Steps

### 1. Upload Files to cPanel
```
Upload all project files to: public_html/branchbusinessadvance.co.ke/
```

### 2. Install Dependencies
```bash
cd public_html/branchbusinessadvance.co.ke/
pip install -r requirements-cpanel.txt
```

### 3. Set Environment Variables
```bash
export SECRET_KEY="(W6B1[bCEAu,1wA[dz7^"
export DB_NAME="acbptxvs_ruralpoint_system"
export DB_USER="acbptxvs_phin"
export DB_PASSWORD="5;)8.H8aTG8%p_]"
export DB_HOST="localhost"
export DB_PORT="3306"
```

### 4. Run Django Commands
```bash
python manage.py makemigrations
python manage.py migrate
python manage.py collectstatic --noinput
python manage.py createsuperuser
```

### 5. Set File Permissions
```bash
chmod 755 .
chmod 644 *.py
chmod 644 .htaccess
chmod -R 755 staticfiles/
chmod -R 755 media/
chmod -R 755 logs/
```

## 🔍 Testing Checklist

- [ ] Homepage loads: https://branchbusinessadvance.co.ke/
- [ ] Admin panel accessible: https://branchbusinessadvance.co.ke/admin/
- [ ] Static files loading (CSS, JS, images)
- [ ] Database connection working
- [ ] User registration/login working
- [ ] File uploads working
- [ ] PDF generation working
- [ ] Email functionality (if configured)

## 🛠️ Troubleshooting

### Common Issues:
1. **500 Error**: Check error logs in cPanel
2. **Database Error**: Verify credentials in settings_production.py
3. **Static Files**: Run `python manage.py collectstatic`
4. **Import Errors**: Check if all packages are installed

### Log Locations:
- Django logs: `logs/django.log`
- cPanel error logs: cPanel → Error Logs
- Apache logs: cPanel → Error Logs

## 📧 Email Configuration (Optional)

To configure email notifications, update these in `settings_production.py`:
```python
EMAIL_HOST = 'your-smtp-server.com'
EMAIL_PORT = 587
EMAIL_HOST_USER = 'your-email@branchbusinessadvance.co.ke'
EMAIL_HOST_PASSWORD = 'your-email-password'
```

## 🔒 Security Notes

- ✅ Secret key is configured
- ✅ DEBUG is set to False
- ✅ Allowed hosts are configured
- ⚠️ Remember to set up SSL certificate
- ⚠️ Configure proper email settings
- ⚠️ Set up regular backups

## 📞 Support

If you encounter issues:
1. Check cPanel error logs
2. Verify database connection
3. Test with Django shell: `python manage.py shell`
4. Check file permissions

---

**Deployment Date**: [Fill in when deployed]
**Deployed By**: [Your name]
**Status**: [Ready/In Progress/Completed] 