You can install a Laravel script on cPanel shared hosting in under an hour if you get three things right: the files sit outside the web root, the domain points at the public folder, and the .env file holds the correct database details. Follow the steps below in order and you will have a working app instead of a blank page.

We install Laravel scripts on shared hosting regularly, and the same handful of mistakes cause almost every failed install.

What do you need before you start?

Before uploading anything, check that your hosting plan can actually run the script. Most modern Laravel scripts need PHP 8.1 or newer, the mbstring, openssl, pdo_mysql, tokenizer, xml, ctype, json and fileinfo extensions, and a MySQL database. In cPanel, open Select PHP Version and confirm the version and extensions. If your host is still on PHP 7.4, the script simply will not run.

You also need the script itself. On codelist.top, every product ships with full unencrypted source code, an installation guide and lifetime free updates. Keep the ZIP handy. You will also need a fresh MySQL database and user, created in cPanel under MySQL Databases — write the database name, username and password down before you start.

Step 1: Upload the files outside public_html

Laravel is built so that only the public folder should be reachable from the web. Everything else — .env, app, config, vendor — must stay out of reach. The most common beginner mistake is unzipping the script directly into public_html, which exposes the whole application.

Instead, create a folder next to public_html, for example /home/username/laravel-app, and extract the script there. Upload the ZIP with File Manager, right-click and choose Extract, then move the contents so that artisan sits directly inside laravel-app.

Step 2: Point the domain at the public folder

This step causes half of all 500 errors we see. A Laravel app's entry point is public/index.php, so your domain's document root must point at /home/username/laravel-app/public, not at public_html.

If the script is your main site, go to Domains in cPanel and change the document root to the public folder. For an addon domain or subdomain, set it when you create it. Some hosts do not allow this from cPanel; open a support ticket and ask them to point the domain at your public folder. Do not work around it with a redirect or by copying index.php into public_html — that exposes your .env file to the internet.

Step 3: Set up the database and the .env file

Now create the database. In MySQL Databases, create a database, create a user with a strong password, and add the user to the database with all privileges. Note the full names — cPanel prefixes them, so they look like username_shopdb and username_shopuser.

Next, edit the .env file inside your app folder. Rename .env.example to .env if the script shipped without one, then set these values:

SettingWhat to put
APP_NAMEYour site name, in quotes if it has spaces
APP_URLYour full domain, starting with https://
DB_DATABASEThe database name from cPanel, with prefix
DB_USERNAMEThe database user, with prefix
DB_PASSWORDThe database user password
APP_KEYGenerate this — see the step below

Keep APP_DEBUG set to false on a live site. A true value shows full error traces to visitors.

Step 4: Generate the APP_KEY and run the installer

Laravel encrypts sessions and cookies with the application key, and the app will throw an error without one. If you have terminal access, run php artisan key:generate from the app folder. If you do not, most scripts include a web installer that generates the key for you. Never copy an APP_KEY from another project — each installation needs its own.

From here, follow the script's own installer. Many codelist.top products, including the ones in our full catalogue, ship with a web-based installer: open your domain, enter the database details and an admin account, and the installer imports the tables. If the script has no installer, import its .sql file through phpMyAdmin instead.

Step 5: Fix permissions and the storage symlink

Laravel writes logs, cache files and uploads into the storage and bootstrap/cache folders, so the web server needs write access there. Set directories to 755 and files to 644 as a rule, and give storage and bootstrap/cache write permission — 775 usually works on shared hosting.

If the app serves uploaded images, it also needs a symlink from public/storage to storage/app/public. Run php artisan storage:link from the terminal if you have it. Without terminal access, create the symlink in cPanel's File Manager or ask support to run the command. Missing this link is why uploaded images often show as broken thumbnails after an otherwise successful install.

Why do I get a 500 error after installing a Laravel script?

A 500 error after install almost always comes from one of four causes. First, the document root is wrong — the domain points at public_html instead of public. Second, APP_KEY is missing. Third, the .env database credentials are wrong, which usually means the cPanel prefix was left off. Fourth, file permissions are too strict on storage.

Diagnose it properly instead of guessing: open storage/logs/laravel.log and read the last error. It will usually name the exact problem. Temporarily setting APP_DEBUG=true shows the same error in the browser, but turn it back to false the moment you have the answer.

What should you check before calling the install finished?

Run through this short checklist before you hand the site to anyone:

  • Homepage loads over HTTPS with no errors, and the admin login page opens.
  • You can log in to the admin panel and save a setting.
  • File uploads work — images appear instead of broken icons.
  • Emails send, or you know exactly which mail settings to fix.
  • APP_DEBUG is false and the .env file is not reachable in the browser.
  • A cron job runs the scheduler, if the script needs scheduled tasks.

If the script needs scheduled tasks, add a cron job in cPanel pointing at php /home/username/laravel-app/artisan schedule:run every minute. Without it, reminders and automated emails silently never run.

Is shared hosting enough, or do you need a VPS?

For most small and medium Laravel scripts — a school system, a POS, a booking tool — shared hosting is genuinely enough. It is cheaper, the host manages the server, and the limits only bite when traffic grows or the app leans on queues and background jobs. A VPS gives you control and headroom, but it also gives you the server to maintain.

Our honest advice: start on shared hosting, and move to a VPS when you have real traffic or a clear technical reason, not before. When you buy a script, check the licence terms first — a Standard licence covers one end product, while an Extended licence covers unlimited end products and your own SaaS use on a single deployment. The full terms are on our licence terms page, and our FAQ page or support on WhatsApp at +92 333 4916432 can help with the rest.