CPANEL DEPLOYMENT GUIDE FOR DJANGO ================================== 1. UPLOAD FILES - Upload all project files to a folder in your home directory (e.g., `/home/username/portfolio`). - Do NOT upload the `venv` folder. 2. CREATE PYTHON APP - In cPanel, go to "Setup Python App". - Create a new application: - Python Version: 3.10 or higher. - Application root: `portfolio` (or your folder name). - Application URL: yourdomain.com - WSGI file location: `passenger_wsgi.py` - Click "Setup". 3. INSTALL DEPENDENCIES - Enter the virtual environment using the command provided at the top of the "Setup Python App" page. - Run: `pip install -r requirements.txt` 4. CONFIGURE ENVIRONMENT - Edit the `.env` file in your application root. - Set `DEBUG=False`. - Update `ALLOWED_HOSTS` and `CSRF_TRUSTED_ORIGINS` with your actual domain. - Ensure SMTP credentials are correct. 5. DATABASE & STATIC FILES - While in the virtual environment, run: - `python manage.py migrate` - `python manage.py collectstatic` 6. MEDIA FILES (OPTIONAL) - To serve media files, create a symlink in `public_html`: `ln -s /home/username/portfolio/media /home/username/public_html/media` 7. RESTART APP - In "Setup Python App", click "Restart". Your portfolio should now be live!