Deploying Laravel on shared hosting

Laravel is a powerful PHP framework, but it requires a specific folder structure that does not fully match the standard setup of our shared hosting. In this article, we explain how to correctly deploy Laravel on a Combell hosting package.

Not possible by default

On a Combell hosting package, your website is loaded by default from the www folder.

Laravel, however, expects the publicly accessible files to be located in the public folder.

This creates a conflict:

  • Hosting expects: www
  • Laravel expects: public

If you do nothing, your website will not work correctly or may not be visible at all.

The recommended solution is to create a symbolic link (symlink) from the www folder to the public folder.

This way:

  • The hosting still sees a www folder
  • But the files are actually served from Laravel’s public folder

Step 1: Upload your Laravel project

Upload your full Laravel project to your hosting package, for example via FTP or Git.

Make sure the structure looks roughly like this:

/home/username/
├── app
├── bootstrap
├── config
├── public
├── resources
├── routes
└── ...

Step 2: Rename the existing www folder

Rename the www folder to something like www_old

Connect to your hosting via SSH and run the following command:

ln -s public www

What does this do?

  • www becomes a reference to public
  • The web server thinks it is serving from www
  • But in reality, it uses Laravel’s public folder

Alternative solution

Instead of using a symlink, you can also modify Laravel so that the framework uses the www folder instead of public.

This requires changes in the Laravel configuration and is less recommended.

More information can be found here:
https://developerhowto.com/2018/11/12/how-to-change-the-laravel-public-folder/

Updated on 15 April 2026

Was this article helpful?

Related Articles