Packaging a Project in Laravel — VPS | Shared Version

Arun Yokesh
2 min readMar 31, 2018

--

There are two types of packaging that can be done in laravel:

  • VPS
  • Shared

VPS

VPS version is for their own use and local testing. So, you would wanna keep it as close to your local system settings as possible.

  1. Delete all the files from app/storage/ in the following folders:
  • Cache
  • Log
  • Sessions
  • Views

2. Change your database settings in app/config/database.php to default.

3. Change your mail settings to default in app/config/mail.php and also make sure to delete your personal settings.

4. If you’ve a local folder in your app/config make sure to delete that.

Shared

Shared version is the one which e generally upload on any server as production. That doesn’t mean the VPS version won’t run on production server. It will. But it’s a good practice not to.

  1. Do all the steps as in VPS version.
  2. Copy all the files in /public/ folder and paste in the root directory, i.e. the place where your server.php lies and delete the public directory forever.
  3. Change the path in /bootstrap/paths.php for ‘public’ and point it towards the root directory.
  4. Sometimes, you might have to change the path of your bootstrap files in your index.php file and point it to your root directory too.

Now your project is ready to deploy 😄

If you like this article. click the applause button! 👏 Follow me on Github, Twitter, Facebook.

--

--

Arun Yokesh
Arun Yokesh

No responses yet