Skip to content

Install on cPanel Hosting

cPanel is the most popular hosting control panel, making it the easiest option for most users. This guide will walk you through deploying bPass on any cPanel-based shared hosting provider.

Prerequisites

Before starting, ensure you have:

  • A cPanel hosting account with PHP 8.2+ support
  • MySQL database access through cPanel
  • Your hosting provider has the required PHP extensions enabled
  • FTP/File Manager access to upload files

Step 1: Prepare Your Files

  1. Download bPass: After purchase, extract the downloaded package
  2. Locate Application Files: You'll find the main application in application.zip
  3. Prepare for Upload: Keep the application.zip file ready for upload

Step 2: Upload to Your Server

  1. Login to cPanel and open File Manager
  2. Navigate to Domain Root:
  3. For main domain: Go to public_html
  4. For subdomain: Go to public_html/subdomain_name
  5. Upload Application:
  6. Click Upload in the File Manager
  7. Select and upload application.zip
  8. Wait for upload to complete
  9. Extract Files:
  10. Right-click on application.zip
  11. Select Extract
  12. Choose to extract to the current directory
  13. Delete the zip file after extraction

Option B: Using FTP Client

  1. Connect via FTP using your hosting credentials
  2. Navigate to public_html (or subdomain folder)
  3. Upload application.zip to the directory
  4. Extract via cPanel File Manager as described above

Step 3: Set Up Domain Document Root

This is crucial for Laravel applications to work properly:

  1. Access cPanel's "Subdomains" or "Addon Domains"
  2. For Main Domain:
  3. Go to "Document Root" settings in cPanel
  4. Change document root from public_html to public_html/public
  5. For Subdomain/Addon Domain:
  6. When creating the subdomain, set the document root to public_html/subdomain_name/public

Important

The document root must point to the public directory inside your Laravel application, not the application root.

Step 4: Configure File Permissions

Set the correct permissions for Laravel to function:

  1. Using File Manager:
  2. Select all files in your application directory
  3. Click Permissions
  4. Set directories to 755
  5. Set files to 644
  6. Make sure storage and bootstrap/cache directories are writable

  7. Key Directories to Make Writable (755 or 777 if needed):

  8. storage/
  9. storage/app/
  10. storage/framework/
  11. storage/logs/
  12. bootstrap/cache/

Step 5: Create MySQL Database

  1. Open cPanel MySQL Databases
  2. Create a New Database:
  3. Enter database name (e.g., bpass_db)
  4. Click Create Database
  5. Create Database User:
  6. Enter username and strong password
  7. Click Create User
  8. Assign User to Database:
  9. Select the user and database
  10. Grant All Privileges
  11. Click Make Changes
  12. Note Your Database Details:
  13. Database name: cpanel_username_bpass_db
  14. Username: cpanel_username_dbuser
  15. Password: (your chosen password)
  16. Host: localhost

Step 6: Run the Web Installer

  1. Visit Your Domain: Open your website in a browser
  2. Automatic Redirect: The system will automatically redirect you to /install
  3. Follow Installation Steps:

Step 1 - License Agreement: - Read and accept the license terms - Select your timezone - Click Next

Step 2 - System Requirements: - The installer will check if your server meets all requirements - If any requirements fail, contact your hosting provider - Click Next when all checks pass

Step 3 - File Permissions: - Verify all directories have proper write permissions - Fix any permission issues if shown - Click Next

Step 4 - Purchase Verification: - Enter your purchase code (if required) - Click Verify & Next

Step 5 - Database Configuration: - Database Host: localhost - Database Name: Your full database name (e.g., cpanel_username_bpass_db) - Database Username: Your database username - Database Password: Your database password - Click Test Connection to verify - Click Next when connection succeeds

Step 6 - Email Configuration: - Configure your email settings for notifications - You can use your hosting provider's SMTP or services like Mailgun - Click Next

Step 7 - Storage & Queue Settings: - Configure file storage (local storage is fine for most setups) - Set up queue driver (database driver works well for shared hosting) - Click Next

Step 8 - Final Setup: - Review your configuration - Click Install to complete the setup - Wait for the installation to finish

Step 7: Post-Installation Security

  1. Remove Installer Files (Important for security):
  2. The installer will guide you to remove installation files
  3. Follow the instructions to secure your application

  4. Set Up SSL Certificate:

  5. Enable SSL through cPanel
  6. Force HTTPS redirects

  7. Configure Backups:

  8. Set up regular database backups through cPanel
  9. Back up your application files regularly

Troubleshooting Common Issues

"500 Internal Server Error"

  • Check file permissions (directories: 755, files: 644)
  • Ensure storage directories are writable
  • Contact hosting provider about PHP error logs

"Database Connection Failed"

  • Verify database credentials
  • Ensure database user has proper privileges
  • Check if database host is correct (usually localhost)

"Application in Debug Mode"

  • This is normal during installation
  • Will be resolved when installation completes

"Composer Dependencies Missing"

  • Most cPanel hosts handle this automatically
  • If issues persist, contact your hosting provider

Need Help?

  • Hosting Issues: Contact your hosting provider's support
  • Application Issues: Check the documentation or contact support
  • Database Problems: Verify your database configuration in cPanel

Your bPass installation should now be complete and accessible through your domain!