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

JeffRay's avatar

Deploying to Basic Hosting

I have a very basic application running on my local with artisan serve running.

I'd like to deploy & test on the hosting service it will eventually be running on. What portions of the application do I upload? The structure I have available to me for saving files is:

  • / - not much goes here excepts predefined directories.

*/html -- this is where the index.php file would go

*/library -- this is where I'd like to place the rest of Laravel's structure (so /library/app /library/database etc..)

Thanks for your help in figuring out if this can be deployed this way.

0 likes
3 replies
jlrdw's avatar

This topic has probably been covered over 100 times on the forum if you do a search for uploading to server, shared hosting or deploy those type of searches you will find literally pages of information. And a while back laravel news had a complete article on this exact topic. https://medium.com/laravel-news/the-simple-guide-to-deploy-laravel-5-application-on-shared-hosting-1a8d0aee923e#.daetdq6ei And From @Qlic
Qlic — 3 weeks ago

It's quite easy really, i don't have a vps either and although i might not be able to use artisan commands through ssh, heres how i do it.

for step one, i assume you have a localhost running, something like xampp with mysql, and that you have migrated and seeded your db move the public folder outside of your laravel folder and rename it to public_html inside the public_html folder, open index.php and add ../laravel to the two includes upload the laravel folder to your domain's root (so it's outside of the public_html folder) upload the contents of your public_html to the domain public_html change your .env file to your domain settings make an export of your localhost mysql tables and import them on your domain's myql All done, site should be running!

JeffRay's avatar

thanks @jlrdw, I'm trying your instructions soon & checking out the links you posted.

In your environment, if you need a table altered or some other upgrade, do you just do that manually?

jlrdw's avatar

As long as your env is above public you are fine otherwise hard-code everything in the configs if in public_HTML.

Please or to participate in this conversation.