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 trialJonathan Grieve
Treehouse Moderator 91,253 PointsWordPress sites blank on front end but still have Admin Area
Hello all,
I'm so close to launching my new website that I built in WordPress. I tried to migrate the site from localhost to my domain, jonniegrieve.co.uk and it worked for the most part. I have access to the site admin area in both localhost and my domain.
But nothing, absolutely nothing shows up on the front end, not even any source code.
I've put a WP_DEBUG on it to try and check for errors but none show up. I'm a bit dispirited at the moment because I don't know why such an error would show up on localhost as I exported the database from there.
Help. :)
Henrik Hansen
23,176 PointsDo you have the problem on your local environment and your web server?
Henrik Hansen
23,176 PointsHow did you do the export?
Jonathan Grieve
Treehouse Moderator 91,253 PointsIt's both localhost and web server
Yes I can retrieve the contrent from admin area, I have full access to that,
I exported the database via phpmyadmin.
Thanks. :-)
1 Answer
Henrik Hansen
23,176 PointsI have successfully recreated this result by making a syntax error in the root index.php - therefore before the Drupal is set to debug mode (the wp-config.php is loaded in wp-load.php on row 37). In my php.ini error reporting is set to output in a log file only. Search for error_reporting in the ini file to see your settings. There should be an explanation in this file before the error_reporting variable.
I also found that there will be issues if the url is not correct in the database. You can see those options if you look in the wp_options table, probably the rows with the ID 1 and 2.
Jonathan Grieve
Treehouse Moderator 91,253 PointsHey there Henrik,
For whatever reason, WP_DEBUG never worked for me. But I think this is because there wasn't anything wrong with the code but somewhere along the line my database files got corrupted. And of course if localhost was corrutped they'd be corrupted on my live server too.
So I've kept the localhost files in case I can get a handle on what went wrong but I went ahead and started again and downloaded a fresh install of WordPress, transferred my theme and plugins across and rebuilt the content. Both installations work properly now.
Thanks again for your help :)
Henrik Hansen
23,176 PointsAwesome, glad you could fix the site!
Henrik Hansen
23,176 PointsHenrik Hansen
23,176 PointsCan you see any of your created content from within the admin area?