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.

WordPress

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 90,705 Points

WordPress 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
Henrik Hansen
23,176 Points

Can you see any of your created content from within the admin area?

Henrik Hansen
Henrik Hansen
23,176 Points

Do you have the problem on your local environment and your web server?

Henrik Hansen
Henrik Hansen
23,176 Points

How did you do the export?

Jonathan Grieve
Jonathan Grieve
Treehouse Moderator 90,705 Points

It'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
Henrik Hansen
23,176 Points

I 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
Jonathan Grieve
Treehouse Moderator 90,705 Points

Hey 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
Henrik Hansen
23,176 Points

Awesome, glad you could fix the site!