Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Daniel Oropeza
4,432 PointsPlease help? I get redirected to the localhost when I enter the live site url?
I am lost..
4 Answers

Austin Whipple
29,687 PointsCould be a couple things:
- You've changed the entry in your computer's hosts file. Read more.
- There are some values in your WordPress site's database that redirect you once you've logged in. Read more.

David Wood
5,705 PointsIt would be helpful to see what you have and to know a little more about what you have done.

Daniel Oropeza
4,432 PointsOk a few details...
So it looks like when I try to access mylivewebsite.com, it redirects me to localhost. It is also using the Xampp server to load the website.
When I try to access mylivewebsite.com/wp-admin, everything works out great. I can get to my login page, I can access the admin page, and it's all being uploaded from my web server (NOT Xampp)
I have checked the wpconfig file and everything looks in order. Only thing that concerns me is that the host names are both 'localhost' for the local site as well as the live site. But I'm not sure that's even an issue.
I will now check my theme files to see if I wrote any code that is redirecting me to localhost/mywebsite.com
Thanks for the input guys, if you have any ideas as to what may be wrong please let me know!

Austin Whipple
29,687 PointsYeah, sounding like there might be some value in your WordPress database causing the site to redirect. Some more information about moving a WP site here: https://wordpress.org/support/topic/remote-site-redirects-to-localhost

Daniel Oropeza
4,432 PointsYeah the whole site is up, I just have to access it through another link that is not mywebsite.com
Thankfully my homepage is a category page so I just go to mywebsite.com/category
I'm not getting the site up yet, I just wanted to show it to someone. I'll figure this out once I'm ready to transfer it to the real domain.
Thank you :)
Daniel Oropeza
4,432 PointsDaniel Oropeza
4,432 Pointssigh maybe I'll just delete everything and try again tomorrow when I have the patience.