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

Randy_Johnson's avatar

Deploying Laravel Access Denied

I am using a shared hosting site, after switching because of poor service I have found a great company to host my site. After taking great advice from fellow laracasts and reading other articles on the matter I have come to the decision that the best course of action is to have

domain > public_html | website_files

public_html > (all public files including the all important 'index.php')

I go into the index.php and change the file path and I am given a cannot access error. I am at the point where I have tried everything and there is no clear instructions.

require __DIR__.'/../../website/vendor/autoload.php';
$app = require_once __DIR__.'/../../website/bootstrap/app.php';
0 likes
2 replies
Snapey's avatar

can you not copy files into the domain folder? (The one above public_html)

Randy_Johnson's avatar

I cannot believe it, I have been working on this for hours. Then I submit this post and POW everything works like magic!

Hello Mark! Massive thank you for all your input!

I am pretty sure I will run into a million more problems.

Please or to participate in this conversation.