Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

djkaushiksk1's avatar

How to use laravel project on shared hosting

Hi,

I have made a laravel project on my localhost and now i want to use it on shared hosting.

Can you give me the steps to do this please.

Many Thanks Kaushik

0 likes
3 replies
webmasterkarthi's avatar
  1. Create a folder outside your public_html(Document root) through your cpanel ex. project1

  2. Upload all your laravel folders to project1 except "public" folder.

  3. Copy "public" folder to "public_html" default root folder of your domain.

  4. Then open index.php in "public" folder (inside public_html) and change require DIR.'/../project1/bootstrap/autoload.php'; $app = require_once DIR.'/../project1/bootstrap/app.php';

Please or to participate in this conversation.