Softaculous

Install Laravel with Softaculous in cPanel

How to install the Laravel PHP framework with Softaculous in cPanel, choose the right PHP version, point the domain to the public folder, configure .env and the database, and keep it updated.

IntermediatecPanel hosting3 min read

Softaculous includes Laravel in its Frameworks category, which gives you a working Laravel skeleton in a few clicks without running Composer yourself. This guide shows how to install Laravel with Softaculous in cPanel and the settings you need afterwards for a secure, working app.

Before you start

  • Open cPanel from MdmHost dashboard → Services.
  • A domain or subdomain for the app, added in cPanel.
  • A PHP version supported by the Laravel release Softaculous offers. Check the requirements shown on the Softaculous Laravel page.

Set the PHP version

  1. Go to cPanel → Software → Select PHP Version or MultiPHP Manager.
  2. Choose a supported PHP version for the domain.
  3. Make sure the extensions Laravel needs are enabled, such as mbstring, openssl, pdo_mysql, tokenizer, xml, ctype, fileinfo and bcmath.

Install Laravel with Softaculous

  1. Go to cPanel → Software → Softaculous Apps Installer.
  2. Search for Laravel or open Frameworks → Laravel.
  3. Click Install Now.
  4. Choose the protocol (https://), the domain, and a directory, or leave it empty to install in the domain's root.
  5. Fill in any requested admin or database details and click Install.

Point the domain to the public folder

Laravel serves requests from its public folder. Everything else, including .env, must not be reachable from the web.

  1. Go to cPanel → Domains → Domains, click Manage next to the domain.
  2. Change the Document Root to the Laravel public folder, for example laravel/public.
  3. Save and reload the site.

Important: If the document root points to the Laravel root instead of public, your .env file with database passwords and the app key may be downloadable. Always fix the document root.

Configure .env and the database

  1. Create a database and user in cPanel → Databases → MySQL Database Wizard if Softaculous did not.
  2. Open .env in File Manager and set APP_URL, DB_DATABASE, DB_USERNAME and DB_PASSWORD.
  3. Set APP_ENV=production and APP_DEBUG=false for a live site.
  4. If you have Terminal access, run migrations from the app folder:
php artisan migrate --force

Add the scheduler cron job

Laravel's task scheduler needs one cron entry. In cPanel → Advanced → Cron Jobs add a job every minute:

cd /home/username/laravel && php artisan schedule:run >> /dev/null 2>&1

Update and manage the install

  • Softaculous installs a starting skeleton. Your own application code and dependencies are normally managed with Composer and Git, not Softaculous upgrades.
  • Use Softaculous → Installations for backups, cloning to staging or removal.

Troubleshooting

  • 500 error: check storage/logs/laravel.log. Common causes are wrong permissions on storage and bootstrap/cache, or a missing APP_KEY.
  • 404 on every route except home: the .htaccess in public is missing or the document root is wrong.
  • Composer platform error: the selected PHP version is too old for the installed packages.

Frequently asked questions

Can I deploy my own Laravel project instead?

Yes. Upload or Git-deploy it and set the document root to public. Softaculous is handy for quick starts and testing.

Does Laravel work on shared hosting?

Yes, for typical web apps. Long-running queue workers and websockets need a VPS or a cron-based queue approach.

Which PHP version should I choose?

The newest version supported by both your Laravel release and your packages.

Next steps

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.