How to install a Laravel script on cPanel hosting
Most Laravel scripts sold with a web installer can be installed on ordinary cPanel hosting in under an hour. This guide covers the steps and the mistakes that cost people the most time. Check your script's own guide in the documentation for anything specific to it.
Before you start
You need:
- A domain or subdomain pointing to your hosting
- cPanel access
- The script's zip file and licence key
- A mailbox you can use for outgoing email
Step 1: choose the right PHP version
In cPanel open MultiPHP Manager, pick your domain and select the PHP version the script requires (for most current scripts, PHP 8.3 or newer). In Select PHP Version or PHP Extensions, enable what the product page lists, commonly pdo_mysql, mbstring, openssl, bcmath, sodium, fileinfo, gd, zip and curl.
Step 2: create the database
Open MySQL Database Wizard. Create a database, create a user with a strong password and give the user all privileges on that database. Write down the database name, user and password: the installer asks for them.
Step 3: upload the files
Use File Manager to upload the zip to the folder for your domain, then extract it. Laravel apps have a public folder that should be the web root. There are two ways to handle that:
- In Domains, set the domain's document root to the
publicfolder. This is the safest option. - If the vendor packages the script with a front door in the main folder, upload as instructed in the guide.
Never leave the application's .env file or storage folders reachable from the web.
Step 4: run the web installer
Open your domain in a browser. The installer checks requirements, asks for the database details, your licence key and the first administrator's name and password. Finish the steps and sign in.
Step 5: add the cron job
Many scripts need a scheduler. In cPanel open Cron Jobs and add a job that runs every minute (or as the guide says), for example:
* * * * * /usr/local/bin/php /home/USER/path-to-app/artisan schedule:run >> /dev/null 2>&1
Replace the PHP path and the app path with yours. Without the cron job, scheduled work such as payouts, reminders and queues will not run.
Step 6: turn on HTTPS
Use SSL/TLS Status to run AutoSSL for the domain, then make sure the site redirects HTTP to HTTPS. Payment gateways and secure cookies need HTTPS.
Step 7: set up email
Create a mailbox such as no-reply@yourdomain and enter its SMTP details in the script's settings, or connect a mail service. Send a test email from the admin panel.
Common problems
- 500 error after upload: the PHP version is too low or an extension is missing. Check the error log in cPanel.
- Installer cannot write files: folder permissions. Set
storageandbootstrap/cacheto be writable (usually 755 or 775). - Blank page or wrong URL: the document root does not point to
public. - Scheduled tasks do nothing: the cron job is missing or uses the wrong PHP path.
- Licence error: the domain in the licence does not match the domain you installed on. Moving a licence is free once from your account.
Want it done for you?
Biply installs scripts for free after purchase: email [email protected] with your hosting details. For branding and customisation, Biply Agency quotes the work.
Frequently asked questions
Can I install a Laravel script on shared hosting?
Yes, if the host offers the required PHP version and extensions, a database, HTTPS and cron jobs.
Do I need SSH or Composer?
Not for scripts that ship with their vendor files, such as Yourbank. Others may offer Composer instructions for advanced users.
Where should the document root point?
To the application's public folder.
How do I update the script later?
Back up the files and the database, upload the new release over the old one as the update guide says and run the update step in the admin.