Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP

Shane McC
Shane McC
3,005 Points

Attempting to upload website. Everything goes into the "public" folder?

I moved my index.php file to the root of my app. and rearranged the below two files

From this

<?php

// ...

require __DIR__.'/../bootstrap/autoload.php';

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

to this

<?php

// ...

require __DIR__.'/./bootstrap/autoload.php';

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

By doing the above step, this partly worked. Meaning, my website uploaded fine, the functionality worked but my CSS was out of place and my website lives within the "public" folder. In this "public" folder the website looks and works great but I don't want my website living within a folder.

My question is, how do I have my website display itself properly at the root level? and not live within the "public" folder.

Thanks

1 Answer

I think this might depend on your hosting package.. Is it shared hosting? I've found that shared hosting will only let you access the public folder.

Shane McC
Shane McC
3,005 Points

Hi Tom Cawthorn

Yes, it's shared hosting. With hostgator