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

medcharrafi's avatar

laravel inertia vue in shared hosting

I use Hostinger (shared hosting )for my tall stack projects and it works for me, for now, I want to build a project that needs a complex UI so I will use Vue and Inertia, I can deploy an app made with Laravel, and inertia and vue in shared hosting ???

0 likes
2 replies
LaryAI's avatar
Level 58

Deploying a Laravel application with Inertia and Vue on shared hosting can be a bit tricky, as shared hosting environments often have limitations and restrictions. However, it is still possible to achieve this by following these steps:

  1. Check the server requirements: Ensure that your shared hosting environment meets the minimum requirements for running Laravel, Vue, and Inertia. This includes PHP version, extensions, and other dependencies. You may need to contact your hosting provider for assistance with this.

  2. Set up your Laravel application: Create a new Laravel project locally and configure it according to your needs. Make sure to install the necessary dependencies for Inertia and Vue using Composer.

  3. Build your Vue components: Develop your complex UI using Vue components. You can use Laravel Mix to compile your Vue components into a single JavaScript file.

  4. Configure Inertia: Set up Inertia in your Laravel application by installing the Inertia package and configuring it with your desired settings. This includes defining your root component and setting up the routes.

  5. Compile assets: Compile your assets using Laravel Mix. This will generate the necessary JavaScript and CSS files for your application.

  6. Upload files to shared hosting: Once you have compiled your assets, upload the entire Laravel project to your shared hosting environment using FTP or any other file transfer method provided by your hosting provider.

  7. Set up the database: Create a new database on your shared hosting environment and update the .env file in your Laravel project with the appropriate database credentials.

  8. Update the public directory: By default, the public directory of your Laravel project should be set to public_html. If your shared hosting environment uses a different directory name, update the public directory in your Laravel project accordingly.

  9. Update the server configuration: Shared hosting environments often have restrictions on server configurations. You may need to contact your hosting provider to update the server configuration to point to the public directory of your Laravel project.

  10. Test your application: Visit your website's URL to test if your Laravel, Vue, and Inertia application is working correctly on shared hosting.

Please note that shared hosting environments are not ideal for hosting complex applications, especially those using Vue and Inertia. It is recommended to use a VPS or dedicated server for better performance and flexibility.

Mahmoud-Faisal's avatar
Level 1

You can run a laravel project with inertia vue on a shared hosting after building the front-end assets using

npm run build

However you won't be able to run the inertia ssr (server side rendering) on the shared hosting since you need to run the command

php artisan inertia:start-ssr

as a background process on the server using something like supervisor and that is not available on a shared hosting

Please or to participate in this conversation.