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

Chris1989's avatar

Laravel-Livewire Project with Shared Server issues

Hi Im faced again a strange problem while uploading lavarel-livewire project on shared server (hostinger)

The project is on subdomain public-html/office The files of public are inside public-html/office and the other files are inside public-html/office/laravel folder

in office/index.php i changed that paths

 require __DIR__.'/laravel/vendor/autoload.php';

 $app = require_once __DIR__.'/laravel/bootstrap/app.php';

I deleted config file inside bootstrap cache, I inserted the correct credentials for sql (i tested locally and works) ( i tried "" on crendentials) I published the livewire assets I cleared all cache , optimize, etc before upload the project

And after that when i enter the site at the top of the page on fortify login page i get error

Connection failed: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: NO)

and the more bizarre is that can enter on project can see the all the db entries BUT seems like doenst load the livewire components, js scripts even tailwind css nothing working search,buttons,sortings, notging!

also on console i get a ton of errors

Uncaught SyntaxError: Unexpected identifier
livewire.js?id=ef0c4e092e24439bb958:1 Uncaught SyntaxError: Unexpected identifier
customers:1180 Uncaught ReferenceError: Livewire is not defined
    
(anonymous) @ customers:1180
customers:1209 Uncaught ReferenceError: PhpDebugBar is not defined
    at customers:1209

Notice that on Local machine everything works perfect! I think that something wrong with path that loads the components, have you ever seen that ?

0 likes
3 replies
bugsysha's avatar

That price you are paying for your shared hosting can be used to get a VPS and avoid all of these issues. So stop wasting time on stupid problems and run away from shared hosting.

Chris1989's avatar

I agree for the issues, although i have two working projects and has <60ms on that shared host , also for that simple projects or an simple website, its overkill to have a vps? why? to pay for a year more that 150 euro for 40gb? or to see some ms difference of speed that for Customer there even not noticeable ?

bugsysha's avatar

I would argue that what you are doing right now is an overkill. Or even worse cause you are wasting your time on things that don't matter. Or if possible even worse, you are wasting your time over and over again on the things that don't matter.

As I said, for the same price you are paying right now you can get a VPS. Probably there won't be any difference cause hardware will be pretty much the same.

1 like

Please or to participate in this conversation.