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

Learner's avatar

upload project laravel

How Upload ready laravel 5 project on shared hosting server ?

0 likes
10 replies
bobbybouwmann's avatar

Did you Google for it?

It's recommended to use a VPS or any other kind of server where you have ssh access. Shared hosting doesn't offer this!

1 like
gerardo15's avatar

It is adviced to use a VPS, but if you really really need to do it, just copy your whole folder including vendor, and point your domain to the public folder, thats it.

but i really do not recommend this way.

Qlic's avatar

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.

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

All done, site should be running!

7 likes
jlrdw's avatar

Hard code the config, dotenv is not meant for production.

jlrdw's avatar

@Qlic I finally had a chance to try your instructions above. They work great, even in wamp. How come prior to this it seems everyone needed a rocket science degree to solve this. That is the best set of instructions I have seen on this, good job. Also @TaylorOtwell should have these in the docs, because everyone doesn't use forge. And from what I tested, it makes a secure setup.

2 likes
jekinney's avatar

Just be sure other then the public folder, you ensure file permissions are locked down is all.

Shared hosted isn't recommended due to hosting limitations you generally don't have with cloud or vps is all. Unlimited until....... Back in the day i'ld get quota emails all the time plus with do starting at $5 month, even though $10 box is recommended arguably in the USA same price as most shared hosting.

jrock2004's avatar

I really wish this was told in the beginning of downloading the project of website. Not every company I work with does VPS

Please or to participate in this conversation.