Installation
Welcome to the Gympify Installation Guide! This documentation will guide you through the process of setting up a basic Gympify instance on cPanel shared hosting.
Upgrade Guide
To upgrade your existing Gympify installation, please follow the detailed instructions in the Upgrade Guide.
Quick Note
If you're looking to install Gympify on VPS (Virtual Private Server), refer to the VPS Installation Guide.
WARNING
While Gympify can be installed on shared hosting, for optimal performance and scalability, we highly recommend using a VPS or a dedicated server. Shared hosting lacks the advanced configuration capabilities required for certain Gympify features.
Server Requirements
To run Gympify efficiently, ensure that your server meets the following requirements. These include the web server, PHP version, necessary extensions, and database requirements.
Web Server
- Apache, nginx, or any other compatible web server.
PHP Requirements
- PHP Version: >= 8.2 (Recommended: Latest stable release of PHP 8.2 or 8.3)
- Required PHP Extensions:
- BCMath
- Ctype
- cURL
- DOM
- Fileinfo
- JSON
- Mbstring
- OpenSSL
- PCRE
- PDO
- Redis (for caching and session management)
- Tokenizer
- XML
- Imagick (for image processing and manipulation)
- ionCube Loader® v13.0 (Ensure the latest version is installed and compatible with your PHP version)
WARNING
The ionCube Loader is critical for running encrypted files. Make sure to download and install the appropriate loader for your server's PHP version.
Database
- MySQL: Latest version recommended (minimum MySQL 5.7 or MariaDB 10.2)
Recommended Configurations
For optimal performance:
- Use nginx as the web server for faster performance and scalability.
- Enable Opcache to improve PHP execution speed.
- Allocate sufficient memory (
memory_limit
) in yourphp.ini
file (e.g., 256M or higher).
Verify Your Server Setup
Run the following command to check your PHP environment and confirm required extensions are enabled:
php -m
This command will list all installed PHP modules. Cross-check it with the list above to ensure compatibility.
WARNING
This project utilizes the latest Laravel version (currently 12.x). Refer to the Laravel documentation for more information.
The root folder for Laravel is /public
. Do not install it in a sub-folder; using a sub-domain is preferable over a sub-folder. We do not support installing our product in a sub-folder.
Download and Setup Application
To set up the application on your development machine, follow these steps:
Download the latest version of Gympify:
Visit the GitHub Release page.
Ensure you are logged in with the correct account and have access to the repository. If you do not have access, please contact the repository owner.
Navigate to Assets and download Gympify_v2.6.1.zip.
Upload the zipped file to your server:
- Use an FTP client (like FileZilla) to upload the zipped file to your server.
- Unzip the file on your server. You can use the following command:bash
unzip Gympify_v2.6.1.zip
- If you are using cPanel, you can unzip the file directly from the File Manager.
Copy configuration files:
Copy
.env.example
to.env
:bashcp .env.example .env
Copy
.htaccess.example
to.htaccess
:bashcp .htaccess.example .htaccess
Update the .env file:
Open the
.env
file in a text editor and update the following lines:bashAPP_DOMAIN=your-domain-name.com
Replace
your-domain-name.com
with your actual domain name.
Setup Database & User
Follow these steps to create a MySQL user and database on cPanel, which can be used to manage your Gympify application's database.
Step 1: Generate an API Token
To automate database creation on tenant creation, generate an API token in cPanel:
- Log in to cPanel as the desired user.
- Navigate to the "Manage API Tokens" section.
- Enter a name for the API token (this is for your reference).
- Leave the expiration field blank (no expiration).
- Click the Create button.
- Copy the token and store it securely.
Step 2: Create a Database and User
To create the database and user:
Create a Database:
- Enter a name for the database in the New Database text box and click Next Step.
Create a Database User:
- Enter a name for the user in the Username field (only alphanumeric characters allowed).
- Set and confirm the user's password.
Grant Privileges:
- Select ALL PRIVILEGES to allow the user full access to the database.
Complete the Setup:
- Click Next Step to finalize the creation of the database and user.
Step 3: Update .env
File
Update the .env
file with the following details for the cPanel, and tenancy configuration:
# cPanel Service
CPANEL_URL=https://your-cpanel-server.com:2083
CPANEL_USER=your-cpanel-username
CPANEL_TOKEN=your-cpanel-token
# Tenancy Settings
TENANCY_DB_MANAGER_MYSQL=cpanel-permission-controlled
TENANCY_DB_PREFIX="${CPANEL_USER}_"
Replace the placeholders with the actual values:
your-cpanel-username
: Your cPanel username.your-cpanel-token
: The API token generated earlier.
How to Get a License
To use Gympify, you need to obtain a valid license. Please refer to the How to Get a License Guide for detailed instructions on acquiring and activating your license.
One Click Installer
Start Installation
- Navigate to
your-domain-name.com/install
to begin the installation process. - Follow the step-by-step installation wizard:
Step 1: System and Requirements Check
In this first step, the installer performs important checks:
- Verifies PHP version and required extensions
- Validates server configurations
- Ensures critical directories are writable
All items should display a green checkmark. If you see any red indicators, you'll need to resolve these issues before continuing.
Step 2: Database and Site Information Setup
Here you'll configure your database connection and site information:
- Database name, username, password, and host
- Site name and administrator account details
Step 3: Installation Process
During this step, the installer will:
- Connect to your database
- Create required tables
- Import initial data
- Configure core settings
Step 4: Installation Complete
Upon successful completion, you'll see a confirmation screen with:
- Success message
- Login instructions
- Your admin credentials
Add Cron Jobs
Cron jobs are scheduled tasks that run at predefined times or intervals on your server. They are essential for Gympify to automate critical processes such as subscription management, scheduled notifications, and maintenance tasks.
Setting Up Cron Jobs in cPanel
Log in to your cPanel account
Find the Cron Jobs section
- Navigate to the "Advanced" section and click on "Cron Jobs"
Add a new cron job
- Select "Once Per Minute" from the Common Settings dropdown
- In the Command field, enter:
# Run Gympify scheduler
/usr/bin/php /home/username/public_html/artisan schedule:run >> /dev/null 2>&1
/usr/bin/php /home/username/public_html/artisan queue:manager >> /dev/null 2>&1
Replace /home/username/public_html
with the actual path to your Gympify installation. If you're unsure about your PHP path, you can use this command instead:
/usr/bin/env php /home/username/public_html/artisan schedule:run >> /dev/null 2>&1
/usr/bin/env php /home/username/public_html/artisan queue:manager >> /dev/null 2>&1
Troubleshooting Common Issues
- Incorrect PHP Path: If you're getting errors, try to find the correct PHP path using SSH with the command
which php
- Permission Issues: Make sure the user running the cron job has appropriate permissions
- Path Problems: Ensure you're using absolute paths to your Gympify installation
For advanced setups or dedicated servers, you might want to consider using Supervisor to manage your queue workers more efficiently.