Step 1: Buy Domain and Connect It to Shared Hosting
- Buy a domain from your registrar (Namecheap, GoDaddy, Cloudflare, etc.).
- From cPanel welcome email, copy nameservers.
- At registrar, replace old nameservers with hosting nameservers.
- In cPanel, open Domains and click Create a New Domain.
- Add your domain and point its document root to your app public directory.
DNS propagation may take from a few minutes up to 24 hours.
Step 2: Create Database and Import SQL in cPanel phpMyAdmin
- Open MySQL Databases in cPanel.
- Create database (example:
cpuser_luminaai). - Create DB user and password.
- Assign user to database with ALL PRIVILEGES.
- Open phpMyAdmin in cPanel.
- Select database, click Import, choose SQL file, click Go.
If SQL file is too large, upload compressed SQL or split dump before import.
Step 3: Upgrade PHP and Enable Required Extensions
In cPanel open Select PHP Version (or MultiPHP Manager):
- Set domain PHP version to 8.2 or 8.3.
- Enable:
bcmath,ctype,curl,fileinfo,gd,intl,mbstring,mysqli/pdo_mysql,openssl,tokenizer,xml,zip. - Optionally enable
exif,opcache,redisif your plan supports them.
Step 4: Upload Laravel Project in File Manager
- Zip project locally (exclude
node_modules). - Upload zip to cPanel File Manager (outside
public_htmlis preferred). - Extract zip into folder like
/home/cpaneluser/luminaai. - Point domain docroot to
/home/cpaneluser/luminaai/public. - If host does not allow custom docroot, copy only
publiccontents topublic_htmland updateindex.phppaths to app folder.
Step 5: Configure .env for Live Site
Set core production values in .env:
APP_ENV=productionAPP_DEBUG=falseAPP_URL=https://yourdomain.comDB_DATABASE=cpuser_luminaaiDB_USERNAME=cpuser_dbuserDB_PASSWORD=strong_password_hereThen from terminal/SSH (or cPanel terminal) run:
composer install --no-dev --optimize-autoloaderphp artisan key:generate --forcephp artisan migrate --forcephp artisan storage:linkphp artisan config:cache && php artisan route:cache && php artisan view:cacheStep 6: Activate SSL and Configure Business Email SMTP
In cPanel open SSL/TLS Status or AutoSSL and run SSL for the domain. If SSL is not active, force HTTPS only after certificate is issued.
Create mailbox in cPanel Email Accounts and configure SMTP in .env:
MAIL_MAILER=smtpMAIL_HOST=mail.yourdomain.comMAIL_PORT=465MAIL_USERNAME=info@yourdomain.comMAIL_PASSWORD=mailbox_passwordMAIL_ENCRYPTION=sslMAIL_FROM_ADDRESS=info@yourdomain.comMAIL_FROM_NAME='LuminaAI'Step 7: Cron, Queue Fallback, and Filament Admin Seed
Shared hosting often has no supervisor, so configure cron and fallback queue:
* * * * * php /home/USER/app/artisan schedule:run >> /dev/null 2>&1php artisan queue:work --stop-when-emptyphp artisan make:filament-userAccess website at https://yourdomain.com and Filament admin at https://yourdomain.com/admin.
Troubleshooting (Shared Hosting)
- Domain opens cPanel default page: verify domain document root points to Laravel
public, then clear browser cache. - 500 Internal Server Error: check
storage/logs/laravel.log, verify file permissions, and ensureAPP_KEYis set. - Mixed content warning after SSL: set
APP_URL=https://yourdomain.comand clear Laravel caches. - SQL upload limit hit in phpMyAdmin: use split SQL or ask host to raise upload limits in PHP settings.
- Composer command unavailable: use cPanel Terminal, SSH, or upload vendor folder from local build as fallback.
- Email not sending: verify SMTP host/port/encryption, mailbox credentials, and use provider-recommended SPF/DKIM records.