╔═══════════════════════════════════════════════════════════════════════════════╗ ║ DEPLOYMENT GUIDE FOR: khelo.mindoxahost.com (Subdomain) ║ ╚═══════════════════════════════════════════════════════════════════════════════╝ 🎯 YOUR SUBDOMAIN: khelo.mindoxahost.com ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ STEP 1: CREATE/VERIFY SUBDOMAIN IN CPANEL ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1. Login to cPanel (mindoxahost.com cPanel) 2. Find "Subdomains" (under Domains section) 3. Check if "khelo" subdomain exists: If EXISTS: ──────────── ✓ Note the Document Root (e.g., /public_html/khelo) ✓ Proceed to STEP 2 If NOT EXISTS: ────────────── Create Subdomain: • Subdomain: khelo • Domain: mindoxahost.com (should auto-fill) • Document Root: /public_html/khelo/public ← IMPORTANT! • Click "Create" STEP 2: CREATE MYSQL DATABASE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1. In cPanel, go to "MySQL® Databases" 2. Create Database: ┌────────────────────────────────────────────────────────┐ │ Database Name: mindoxahost_khelo │ │ Click "Create Database" │ └────────────────────────────────────────────────────────┘ 3. Create Database User: ┌────────────────────────────────────────────────────────┐ │ Username: mindoxahost_khelouser │ │ Password: [Generate Strong Password] │ │ Click "Create User" │ └────────────────────────────────────────────────────────┘ 4. Add User to Database: ┌────────────────────────────────────────────────────────┐ │ User: mindoxahost_khelouser │ │ Database: mindoxahost_khelo │ │ Privileges: ✓ ALL PRIVILEGES │ │ Click "Make Changes" │ └────────────────────────────────────────────────────────┘ 5. ✍ WRITE DOWN (You'll need these): ┌────────────────────────────────────────────────────────┐ │ Database Name: ________________________________ │ │ Database User: ________________________________ │ │ Database Password: ____________________________ │ └────────────────────────────────────────────────────────┘ STEP 3: UPLOAD PROJECT FILES ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ METHOD A: File Manager (Recommended for you) ───────────────────────────────────────────────────────────────────────────── 1. In cPanel, go to "File Manager" 2. Navigate to: /public_html/khelo/ 3. If directory doesn't exist, create it: • Click "+ Folder" → Name: khelo → Create 4. Enter the khelo folder 5. Upload files: OPTION 1: Upload ZIP (EASIER) ───────────────────────────── a. On your computer, ZIP the entire "install" folder Location: /Applications/XAMPP/xamppfiles/htdocs/Khelopak/install/ b. In File Manager, click "Upload" c. Select your ZIP file d. Wait for upload to complete e. Right-click ZIP file → "Extract" f. Move all files from extracted "install" folder to khelo root g. Delete ZIP and empty folders OPTION 2: Direct Upload ──────────────────────── a. Click "Upload" b. Select and upload these folders: • app/ • bootstrap/ • config/ • database/ • public/ • resources/ • routes/ • storage/ • vendor/ c. Upload these files: • .env • .htaccess • artisan • composer.json • composer.lock • index.php • package.json • webpack.mix.js STEP 4: CONFIGURE DOCUMENT ROOT ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ IMPORTANT: Your subdomain must point to the PUBLIC folder! 1. In cPanel, go back to "Subdomains" 2. Find "khelo.mindoxahost.com" 3. Click "Manage" or Edit icon 4. Update Document Root to: ┌────────────────────────────────────────────────────────┐ │ /public_html/khelo/public │ └────────────────────────────────────────────────────────┘ 5. Click "Change" or "Save" VERIFY: Your files should be organized like this: /public_html/khelo/ ├── app/ ├── bootstrap/ ├── config/ ├── database/ ├── public/ ← Subdomain points HERE │ ├── index.php │ ├── .htaccess │ └── assets/ ├── resources/ ├── routes/ ├── storage/ ├── vendor/ ├── .env └── artisan STEP 5: IMPORT DATABASE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1. In cPanel, go to "phpMyAdmin" 2. In left sidebar, click on your database: → mindoxahost_khelo 3. Click "Import" tab at the top 4. Click "Choose File" button 5. Select: shop.sql Location: /Applications/XAMPP/xamppfiles/htdocs/Khelopak/install/shop.sql 6. Scroll down and click "Go" 7. Wait for success message ✓ "Import has been successfully finished" ✓ You should see 118 tables created STEP 6: CONFIGURE .ENV FILE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1. In File Manager, navigate to: /public_html/khelo/ 2. Find ".env" file 3. Right-click → "Edit" (or "Code Edit") 4. Update these values: ┌────────────────────────────────────────────────────────┐ │ APP_NAME="KheloPakistan" │ │ APP_ENV=production │ │ APP_DEBUG=false ← IMPORTANT: false! │ │ APP_URL="https://khelo.mindoxahost.com" │ │ APP_TIMEZONE="Asia/Karachi" │ │ │ │ DB_CONNECTION=mysql │ │ DB_HOST="localhost" │ │ DB_PORT="3306" │ │ DB_DATABASE="mindoxahost_khelo" │ │ DB_USERNAME="mindoxahost_khelouser" │ │ DB_PASSWORD="your_database_password_here" │ │ │ │ FORCE_HTTPS="On" ← Set to "On" after SSL │ └────────────────────────────────────────────────────────┘ 5. Click "Save Changes" STEP 7: SET FILE PERMISSIONS ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1. In File Manager (/public_html/khelo/), select these folders: • storage/ • bootstrap/cache/ • public/uploads/ 2. For EACH folder: a. Right-click → "Change Permissions" b. Set to: 755 Or check: Read, Write, Execute for Owner Read, Execute for Group Read, Execute for World c. ✓ Check "Recurse into subdirectories" d. Click "Change Permissions" 3. For .env file: Right-click .env → "Change Permissions" → 644 STEP 8: INSTALL SSL CERTIFICATE (FREE) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1. In cPanel, go to "SSL/TLS Status" 2. Find "khelo.mindoxahost.com" in the list 3. Click "Run AutoSSL" button 4. Wait for "Certificate installed successfully" 5. Update .env: FORCE_HTTPS="On" STEP 9: TEST YOUR WEBSITE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1. Visit: https://khelo.mindoxahost.com ✓ Homepage should load ✓ Images should display ✓ No errors 2. Test Admin Panel: URL: https://khelo.mindoxahost.com/admin ✓ Login page loads 3. Check database users table for admin credentials STEP 10: OPTIMIZE (Optional but Recommended) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ If you have SSH access: ssh your_username@mindoxahost.com cd public_html/khelo php artisan config:cache php artisan route:cache php artisan view:cache php artisan optimize ═══════════════════════════════════════════════════════════════════════════════ TROUBLESHOOTING ═══════════════════════════════════════════════════════════════════════════════ ❌ 500 Internal Server Error ─────────────────────────────── → Check storage/ permissions (755) → Check .htaccess exists in public/ folder → Set APP_DEBUG=true temporarily in .env → Check error logs in cPanel: Home → Errors ❌ Page shows "No input file specified" ──────────────────────────────────────── → Document Root is wrong → Should be: /public_html/khelo/public → Go to cPanel → Subdomains → Edit khelo → Update path ❌ Database Connection Error ───────────────────────────── → Check database name in .env (includes prefix like mindoxahost_) → Verify username and password → Ensure DB_HOST="localhost" ❌ Images Not Loading ────────────────────── → Check public/uploads/ permissions (755) → Verify APP_URL in .env: https://khelo.mindoxahost.com → Clear browser cache (Ctrl+F5) ❌ CSS/JS Not Loading ────────────────────── → Check APP_URL in .env → Verify document root points to public/ folder → Clear browser cache ═══════════════════════════════════════════════════════════════════════════════ QUICK REFERENCE ═══════════════════════════════════════════════════════════════════════════════ Your URLs: ────────── Frontend: https://khelo.mindoxahost.com Admin: https://khelo.mindoxahost.com/admin API: https://khelo.mindoxahost.com/api/v2/ Your Database: ────────────── Name: mindoxahost_khelo User: mindoxahost_khelouser Host: localhost Your Paths: ─────────── Project Root: /public_html/khelo/ Document Root: /public_html/khelo/public/ Storage: /public_html/khelo/storage/ Important Files: ──────────────── Config: /public_html/khelo/.env Logs: /public_html/khelo/storage/logs/laravel.log ═══════════════════════════════════════════════════════════════════════════════ POST-DEPLOYMENT CHECKLIST ═══════════════════════════════════════════════════════════════════════════════ □ Database created and imported (118 tables) □ All files uploaded to /public_html/khelo/ □ Document root set to /public_html/khelo/public □ .env file updated with correct values □ APP_DEBUG=false in production □ Folder permissions set (755 for storage/) □ SSL certificate installed (AutoSSL) □ FORCE_HTTPS="On" in .env □ Website accessible at https://khelo.mindoxahost.com □ Admin panel accessible □ No errors on homepage □ Images displaying correctly ═══════════════════════════════════════════════════════════════════════════════ Deployment Guide for: khelo.mindoxahost.com Project: KheloPakistan E-Commerce Platform Prepared: December 30, 2025 ═══════════════════════════════════════════════════════════════════════════════