9.2 KiB
Epic Travel & Expeditions - cPanel PHP Installation Guide
📋 Overview
This guide will help you install Epic Travel & Expeditions on standard cPanel hosting using only FTP or File Manager - no SSH, Python, or root access required!
✅ Requirements
- cPanel hosting account
- PHP 7.4 or higher
- MySQL 5.7+ or MariaDB 10.3+
- At least 100MB disk space
- FTP client (FileZilla, WinSCP) OR cPanel File Manager access
📦 Package Contents
epic-travel-php/
├── frontend/ # React production build
│ ├── index.html
│ ├── .htaccess
│ └── static/
├── api/ # PHP backend
│ ├── index.php # Main API router
│ ├── config.php # Configuration file
│ ├── .htaccess
│ ├── setup_password.php
│ ├── includes/
│ └── api/
├── database_schema.sql # MySQL database structure
└── INSTALLATION.md # This file
🚀 Installation Steps
Step 1: Create MySQL Database
-
Log into cPanel
-
Go to "MySQL® Databases"
-
Create New Database:
- Database name:
epictravel(or your choice) - Click "Create Database"
- Database name:
-
Create Database User:
- Username: Choose a username
- Password: Generate a strong password
- Click "Create User"
-
Add User to Database:
- Select your user
- Select your database
- Grant ALL PRIVILEGES
- Click "Make Changes"
-
Note Down:
- Database name:
username_epictravel - Username:
username_dbuser - Password:
your_password - Host:
localhost
- Database name:
Step 2: Import Database Schema
Option A: Using phpMyAdmin
- Go to cPanel → phpMyAdmin
- Select your database from the left sidebar
- Click "Import" tab
- Click "Choose File" and select
database_schema.sql - Click "Go" at the bottom
- Wait for "Import has been successfully finished" message
Option B: Using MySQL Databases Tool
- Go to cPanel → MySQL Databases
- Find "Run SQL on Database" section (if available)
- Copy contents of
database_schema.sql - Paste and execute
Step 3: Upload Files via FTP
Using FTP Client (FileZilla, WinSCP, etc.):
-
Connect to your server:
- Host:
ftp.yourdomain.com(or your server IP) - Username: Your cPanel username
- Password: Your cPanel password
- Port: 21 (or 22 for SFTP if available)
- Host:
-
Upload Frontend:
- Navigate to
public_html/(or your domain's folder) - Upload all files from
frontend/folder - Make sure
.htaccessis uploaded
- Navigate to
-
Upload Backend:
- Create folder:
public_html/api/ - Upload all files from
api/folder topublic_html/api/ - Make sure
.htaccessis uploaded - Create folder:
public_html/api/uploads/(empty folder for image uploads)
- Create folder:
Step 3 (Alternative): Upload via File Manager
Using cPanel File Manager:
- Open File Manager in cPanel
- Navigate to
public_html/ - Upload Frontend:
- Click "Upload" button
- Select all files from
frontend/folder - Wait for upload to complete
- Create API Folder:
- Click "New Folder"
- Name it
api
- Navigate to
public_html/api/ - Upload Backend:
- Click "Upload"
- Select all files from
api/folder
- Create Uploads Folder:
- Inside
/api/, click "New Folder" - Name it
uploads - Right-click → "Change Permissions" → Set to
755
- Inside
Step 4: Configure Database Connection
-
Navigate to
public_html/api/ -
Edit
config.php(right-click → Edit or Code Editor) -
Update these lines:
define('DB_HOST', 'localhost'); define('DB_NAME', 'username_epictravel'); // Your database name define('DB_USER', 'username_dbuser'); // Your database user define('DB_PASS', 'your_password'); // Your database password -
Generate JWT Secret Key:
- Visit: https://www.grc.com/passwords.htm
- Copy the "63 random alpha-numeric characters" key
- Update in config.php:
define('JWT_SECRET_KEY', 'paste_your_generated_key_here'); -
Update CORS Origin:
define('ALLOWED_ORIGINS', 'https://yourdomain.com'); -
Save the file
Step 5: Setup Admin Password
Method A: Using Browser (Recommended)
- Visit:
https://yourdomain.com/api/setup_password.php - Enter your desired admin password (e.g.,
Joker1974!!!) - Check "Update password in database"
- Click "Generate Hash"
- Verify success message
- IMPORTANT: Delete
setup_password.phpfile immediately
Method B: Manual Database Update
- Go to phpMyAdmin
- Select your database
- Find
admin_userstable - Click "Edit" (pencil icon) for the admin row
- In
password_hashfield, paste the generated hash - Click "Go"
Step 6: Set Folder Permissions
Via File Manager:
- Right-click
api/uploads/folder - Select "Change Permissions"
- Set to
755(or775if needed) - Click "Change Permissions"
Via FTP Client:
- Right-click
api/uploads/folder - File Permissions →
755 - Apply
Step 7: Test Installation
-
Test Backend API:
- Visit:
https://yourdomain.com/api/ - Should see:
{"message":"Epic Travel API is running","status":"healthy"}
- Visit:
-
Test Frontend:
- Visit:
https://yourdomain.com - Should see the Epic Travel homepage
- Visit:
-
Test Admin Login:
- Visit:
https://yourdomain.com/admin - Email:
admin@epictravel.com - Password:
Joker1974!!!(or your chosen password)
- Visit:
🔧 Troubleshooting
"Internal Server Error" (500)
Check PHP Version:
- cPanel → MultiPHP Manager
- Ensure PHP 7.4 or higher is selected
- Apply changes
Check .htaccess:
- Ensure
.htaccessfiles are uploaded - Check if they're hidden (Show Hidden Files in File Manager)
Check Permissions:
- Folders:
755 - Files:
644 - uploads/ folder:
755or775
Database Connection Failed
- Verify credentials in config.php
- Check user privileges in cPanel → MySQL Databases
- Try localhost vs 127.0.0.1 in DB_HOST
- Contact hosting support if issue persists
Frontend Shows Blank Page
- Check browser console (F12) for errors
- Verify API is working (
/api/endpoint) - Check
.htaccessin public_html - Clear browser cache (Ctrl+Shift+Del)
CORS Errors
- Update ALLOWED_ORIGINS in config.php
- Use your actual domain (with https://)
- Restart by saving config.php again
Can't Upload Images
- Check uploads/ folder exists
- Set permissions to 755 or 775
- Check PHP upload_max_filesize:
- cPanel → MultiPHP INI Editor
- Increase upload_max_filesize to 10M
- Increase post_max_size to 10M
Admin Login Not Working
- Verify password was set correctly
- Run setup_password.php again
- Check admin_users table in database
- Clear browser cookies
📁 File Structure After Installation
public_html/
├── index.html # Frontend entry point
├── .htaccess # Frontend routing
├── static/ # CSS, JS files
│ ├── css/
│ └── js/
├── api/ # Backend
│ ├── index.php # API router
│ ├── config.php # Configuration
│ ├── .htaccess # API routing
│ ├── includes/ # Core files
│ │ ├── database.php
│ │ ├── jwt.php
│ │ └── functions.php
│ ├── api/ # Endpoints
│ │ ├── auth.php
│ │ ├── destinations.php
│ │ ├── specials.php
│ │ ├── contact.php
│ │ ├── newsletter.php
│ │ └── upload.php
│ └── uploads/ # Image uploads (empty)
└── favicon.ico
🔐 Security Checklist
After installation:
- Changed admin password from default
- Updated JWT_SECRET_KEY in config.php
- Deleted setup_password.php
- Set correct folder permissions
- Enabled SSL certificate (HTTPS)
- Updated ALLOWED_ORIGINS to your domain
- Verified config.php is not web-accessible
- Regular backups scheduled
🔄 Updating the Application
-
Backup first!
- Download current files via FTP
- Export database via phpMyAdmin
-
Upload new files:
- Don't overwrite
config.php - Upload updated files only
- Don't overwrite
-
Run database migrations (if any)
-
Test thoroughly
📞 Support
Application: Epic Travel & Expeditions Contact: advisor@epictravelexpeditions.com Phone: +1 (817) 266-2022
For Hosting Issues:
- Contact your hosting provider's support
- Share error logs from cPanel → Error Logs
Common Hosting Providers with cPanel:
- Bluehost, HostGator, SiteGround, A2 Hosting, InMotion
- GoDaddy, Namecheap, DreamHost
✨ Success!
If everything is working:
- Visit your website
- Browse destinations
- Try the contact form
- Subscribe to newsletter
- Login to admin panel
- Add/edit destinations
Congratulations! Your Epic Travel website is now live! 🎉
Next Steps:
- Customize destination content
- Add your own images
- Update contact information
- Set up email forwarding for contact forms
- Enable SSL certificate for HTTPS
- Submit to search engines
Need help? Email us at advisor@epictravelexpeditions.com