Installation Guide
How to install GymHub on a new web server from scratch.
GymHub is a PHP/MySQL web application. This guide explains how to set it up on any standard web hosting account in about 10 minutes.
Server Requirements
Before installing, make sure your hosting account supports:
- PHP 8.0 or higher — GymHub uses PHP 8.0+ syntax (match expressions, named arguments)
- MySQL 5.7 or higher (or MariaDB 10.3+)
- PDO and PDO_MySQL PHP extensions enabled
- File uploads enabled — needed for trainer Q&A attachments
- Standard shared hosting (cPanel, Plesk) works perfectly
✅ Tested On
GymHub has been tested and confirmed working on uWindsor myweb.cs.uwindsor.ca shared hosting with PHP 8.x and MySQL.
Step-by-Step Installation
Download the Source Code
Download the latest GymHub source code from GitHub. Click the green Code button → Download ZIP. Extract the ZIP file on your computer.
Alternatively, if you have Git installed, clone the repository:
git clone https://github.com/seehrar/gymhub.git
Upload Files to Your Server
Using your hosting file manager or an FTP client (like FileZilla):
- Navigate to your public web directory (e.g.
public_html/orwww/) - Create a subfolder for the project (e.g.
gymhub/) or upload to the root - Upload all the GymHub files and folders into that directory
- Make sure the folder structure is preserved —
config/,pages/,admin/, etc.
Create the Database
Log in to your hosting control panel (cPanel or phpMyAdmin directly):
- Create a new MySQL database — name it something like
yourname_gymhub - Create a database user with a strong password
- Grant the user All Privileges on the new database
Import the Database Schema
Open phpMyAdmin and select your newly created database.
- Click the Import tab at the top
- Click Choose File and select
sql/gymhub.sqlfrom the project files you downloaded - Click Import at the bottom
This creates all 13 tables and inserts seed data including sample classes, users, and settings.
Configure Database Credentials
Open config/db.php in a text editor and update
these four lines to match your hosting credentials:
define('DB_HOST', 'localhost');
define('DB_NAME', 'yourname_gymhub'); // your database name
define('DB_USER', 'yourname'); // your database username
define('DB_PASS', 'your_password'); // your database password
define('SITE_URL', 'https://your-domain.com/gymhub'); // no trailing slash
SITE_URL must be the full URL to the folder where you uploaded the files. No trailing slash at the end.
Create Your Admin Account
Two ways to create an admin account:
Option A (recommended): Register a normal account at
/pages/register.php, then open phpMyAdmin → users table →
find your row → change the role column from member
to admin.
Option B: Run this SQL in phpMyAdmin, replacing the values:
INSERT INTO users (first_name, last_name, email, password, role, status)
VALUES (
'Admin', 'User',
'admin@yoursite.com',
'$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uSc/kei',
'admin', 'active'
);
-- Default password is: password
-- Change it immediately after logging in!
Visit Your Site
Open a browser and go to your SITE_URL. You should see the GymHub homepage. Log in with your admin account to access the admin panel.
If you see a database error, double-check the credentials in
config/db.php and make sure the SQL was imported successfully.
Troubleshooting
Enable PHP error reporting or check your server's error log. Most likely cause: incorrect database credentials in config/db.php.
The SITE_URL in config/db.php is wrong. Check it matches the exact URL you're visiting. Right-click any image → Inspect to see the URL it's trying to load.
Make sure ob_start() is at the top of config/db.php and that PHP sessions are enabled on your hosting. On some servers you may need to set a custom session save path.
Check that public/assets/uploads/ exists and is writable (chmod 755). PHP's upload_max_filesize must be at least 5MB.
The seed data includes schedule entries that may have expired. Run the schedule refresh SQL from the project README to insert new sessions starting from today.