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

mattnewark's avatar

Deploying Laravel

Good Morning All,

I am trying to deploy my site on a VPS and I have followed the below guide created by @Snapey so that I am hiding the core code above the public_html folder:

http://novate.co.uk/deploy-laravel-5-on-shared-hosting-from-heart-internet/

The issue that I have now is when I SSH into the folder and try and run the artisan command it doesn't work. I go to the folder core folder and try to run the queue:listen command and it seems to ignore the request. I run php artisan and it doesn't work either, no error.

Can someone please point me in the right direction

Thanks

0 likes
8 replies
jdunsmore's avatar

When you are trying to call artisan commands are you in the same directory as the artisan file?

jdunsmore's avatar

Could you provide a screenshot of your folder structure on your VPS (where your site files are)

And also your public/index.php file.

mattnewark's avatar

Hi

So I have all files apart from the public folder above the public_html in a folder called auditstagingcore, I have emptied the public folder contents into a folder called auditstaging below the public_html. I have also changed the index file to point to the new core folder.

Thanks

jdunsmore's avatar
Level 2

I dont like this method of deployment as from past experience there is always small issues that arise and no clear resolution.

What I would do is upload everything into the public_html folder, including Laravels public folder.

Then on your VPS alter the apache2 conf to tell it the sites root is public_html/public

Or your nginx conf. Whichever you are using.

Be sure to revert the index.php to the default path that ships with laravel.

Regards.

1 like
mattnewark's avatar

@jdunsmore,

I have had it working previously with pointing the domain to the public folder so I am just going to revert everything back to what it was..

Thanks

1 like

Please or to participate in this conversation.