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

WordPress Local WordPress Development Local WordPress Development Installing a Local Web Server on a PC

I can't access my local host

I've been watching this video and have followed each of Zac's steps but when I type in localhost - it doesn't come up with localhost/xampp/splash.php like it does on the video, mine comes up with localhost/dashboard. If i copy the testsite.com/index.php it says object not found, what can I do?

Since you're using xampp, go to xampp folder ( is where you've instaled it ) and at the buttom, you're going to find something named xampp-control. Run it and start apache. Then, past your php file to a folder named htdocs ( you can delete everything that is in that folder ). Write /localhost on your url and that should do.

PS. If that does not work, you can try /localhost:80 or /localhost:8000 or /localhost:8080

Problem solved! I changed the port numbers and it's finally worked!

John Delorbe
John Delorbe
3,192 Points

i went and changed my port number for apache but i was directed to localhost/dashboard. i cant catch a break lol been on this for two days already with no luck . did you delete all of the folders in the htdocs like bruno suggested?

1 Answer

Since you're using xampp, go to xampp folder ( is where you've instaled it ) and at the buttom, you're going to find something named xampp-control. Run it and start apache. Then, past your php file to a folder named htdocs ( you can delete everything that is in that folder ). Write /localhost on your url and that should do.

PS. If that does not work, you can try /localhost:80 or /localhost:8000 or /localhost:8080

John Delorbe
John Delorbe
3,192 Points

Bruno should i make a new file in the htdocs with a .php ? and delete all the other folders. is that correct ?