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

thesnakebite's avatar

Issues Deploying Laravel 11 on Shared Hosting (Hostinger) – Vite Manifest Not Found

Hi everyone,

I’ve been struggling for over two days trying to deploy a Laravel 11 project on a shared hosting environment (Hostinger), and I’m encountering a persistent issue with the Vite manifest file not being found.

Setup:

•	Laravel version: 11
•	Using: Vue3, Inertia, Vite, Tailwind, and PHP 8.2
•	Server: Hostinger (Shared Hosting)
•	No root access, limited to shared hosting features.

Problem:

I’ve set up my project according to the typical deployment steps, including moving the contents of the public folder to public_html, configuring the vite.config.js file, and binding the public path in the AppServiceProvider.php. Despite following the recommended practices for adjusting the public path and successfully running npm run build, Laravel still throws an error:

Vite manifest not found at: /home/u639623795/domains/mydomain.com/public_html/build/manifest.json

This is confusing because the manifest.json file does exist in the correct path (public_html/build). I’ve also tried clearing all caches (routes, views, config, etc.), running fresh builds, and adjusting file permissions.

What I’ve Tried:

1.	AppServiceProvider.php: I’ve bound the public path like this:

$this->app->bind('path.public', function() { return base_path('../public_html'); });

2.	vite.config.js:

export default defineConfig({ plugins: [ svgLoader(), laravel({ input: 'resources/js/app.js', refresh: true, }), vue({ template: { transformAssetUrls: { base: null, includeAbsolute: false, }, }, }), quasar({ sassVariables: 'src/quasar-variables.sass' }) ], build: { outDir: '../public_html/build', emptyOutDir: true, } });

3.	Correct folder structure:
•	public_html/ contains the build files (assets, manifest.json, etc.)
•	The main Laravel app files (routes, config, resources, etc.) are outside public_html.

The Issue:

Despite these efforts, Laravel keeps looking for the Vite manifest in the correct path but fails to find it. I’m stuck at this point and not sure what else to check or change. I’m wondering if there’s something specific to shared hosting or Laravel 11’s handling of Vite assets that I’m missing.

Has anyone else experienced this issue or have insights on what could be going wrong with deploying Laravel 11 on shared hosting?

Thanks in advance!

0 likes
10 replies
vincent15000's avatar

Vite manifest not found at: /home/u639623795/domains/mydomain.com/public_html/build/manifest.json

This message shows that Laravel tries to read the manifest.json file in the right folder.

So the question is : where is your manifest.json file ?

You probably have run ``npm run build``` locally and pushed the files to the repo. So are the files in the right folder ?

thesnakebite's avatar

Hello @vincent15000 && @jsanwo64 ,

I’ve been struggling with an issue for the past three days while trying to deploy a Laravel 11 project on a shared hosting environment (Hostinger).

The main problem is that Laravel keeps looking for the manifest.json in the public/build directory, even though I have configured my vite.config.js to output everything into public_html/build.

Here’s what I have in my vite.config.js:

export default defineConfig({ plugins: [ svgLoader(), laravel({ input: 'resources/js/app.js', refresh: true, }), vue({ template: { transformAssetUrls: { base: null, includeAbsolute: false, }, }, }), quasar({ sassVariables: 'src/quasar-variables.sass' }) ], build: { outDir: '../public_html/build', emptyOutDir: true, } });

After running npm run build, everything compiles correctly into public_html/build, but Laravel keeps throwing this error:

Vite manifest not found at: /home/u639623795/domains/mydomain.com/public/build/manifest.json

I know the assets and manifest.json are being correctly placed in the public_html/build directory, but Laravel continues looking in the public folder.

I’ve tried clearing caches, reconfiguring the paths, and re-running the build process multiple times, but nothing seems to work. Is there a more proper way to tell Laravel to use the public_html folder instead of public?

Any help or insight into what might be going wrong would be greatly appreciated!

Thanks in advance.

1 like
vincent15000's avatar

@thesnakebite There is a problem with what you write, both error messages are not the same.

First you wrote : // with public_html

Vite manifest not found at: /home/u639623795/domains/mydomain.com/public_html/build/manifest.json

And now you write : // with public

Vite manifest not found at: /home/u639623795/domains/mydomain.com/public/build/manifest.json

What is exactly the error message ?

1 like
thesnakebite's avatar

Thank you for pointing that out! You’re right that I mentioned two different paths. The issue is that even though I have configured Vite to compile assets into the public_html folder, Laravel seems to keep looking for the manifest.json file in the public folder. I updated my vite.config.js to point the output to public_html/build, but Laravel still expects the manifest in public.

I’ve tried various fixes, including changing the paths in configuration files, but Laravel doesn’t seem to recognize the public_html folder as the public directory. Any advice on how to correctly configure Laravel 11 to use public_html instead of public would be greatly appreciated!

2 likes
thesnakebite's avatar

Thank you @jlrdw for sharing the link. I took a look at the discussion, and while it provides several approaches, I managed to resolve the issue by modifying the bootstrap/app.php file to change Laravel’s public path to public_html.

This allowed Laravel to correctly locate the manifest.json and other assets without needing to rely on .htaccess redirects or symlinks.

However, I’m still open to learning if there’s a more efficient or standard way to handle this, especially on shared hosting environments like Hostinger. If anyone has experience with alternative methods, I’d love to hear your thoughts.

Thanks again for the support!

1 like
taylorpiber's avatar

@thesnakebite I came across this same problem, my application worked normally on the server (I used aapanel), but when I uploaded it stopped working and showed me this error, my actions already run the commands for everything to work correctly, I don't know what could be causing it the error, I'm using laravel 11 vue3 inertia and tailwind, I'm just not able to resolve it, how did you manage it?

1 like
Alexbece's avatar

@thesnakebite excuse me sir, can you show me how you fix your bootstrap/app.php? im on the same page with your problem right now. glad if you want to help

1 like

Please or to participate in this conversation.