cPanel / Shared Hosting Setup
Overview
Installing on shared hosting requires a few extra steps since you may not have SSH access or full control over server configuration.
Step 1: Upload Files
Upload the entire CreateCouponWebsite folder to your hosting account via File Manager or FTP. Place it above the public_html directory.
Step 2: Move Public Files
Move everything from the public/ folder into your public_html/ directory. Then edit public_html/index.php:
php// Change this line:
require __DIR__.'/../vendor/autoload.php';
// To point to your app directory:
require __DIR__.'/../createcouponwebsite/vendor/autoload.php';
Step 3: Create Database
Use cPanel's MySQL Database Wizard to:
- Create a new database
- Create a database user
- Assign all privileges
Step 4: Configure .env
Update the .env file with your cPanel database credentials.
cpaneluser_couponsite.Step 5: Run Migrations
If you have SSH access, run php artisan migrate --seed. Otherwise, use the web-based installer at your-domain.com/install.
Step 6: Set Up Cron Job
In cPanel, go to Cron Jobs and add:
* * * * * cd /home/username/createcouponwebsite && php artisan schedule:run >> /dev/null 2>&1
This is required for coupon auto-import and expired coupon cleanup.