OK, so I was editing my functions.php file in Wordpress (on my child theme) and i removed a line of code (I copied the code before removing it). This caused the white screen of death, so I simply pasted back in the code I had removed (yes, I pasted it back in the exact place I removed it from), but I still have the white death screen.

I have taken the functions.php file from a backup I completed last week (fully functioning) and uploaded this to the correct folder through FTP, but nothing is working.

I have gone and managed to activate the parent theme again, and have created another child theme so I could compare the 2 functions.php files (compare the brand new, functioning, child theme with the original child theme that is no longer working) and the code looks to be identical.

I have even copied the code from the currently functioning child theme to the non-functioning version, and nothing changes..

I would like to try and keep the child theme that isn't currently working because I have spent all day today making alterations to the styling and dont have a backup for this yet (i know, i know...)

any handy tips would be very much appreciated.


closed as off-topic by Mark Kaplun, Jack Johansson, Michael, cjbj, Howdy_McGee Sep 25 '17 at 14:27

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?" – Mark Kaplun, Jack Johansson, Michael, cjbj, Howdy_McGee
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    Please go to wp-config.php and set to true the debug option – Xenofexs Sep 21 '17 at 10:06
  • Sorry, the line of code i removed (and then replaced again) was // Exit if accessed directly – dcrossnz Sep 21 '17 at 10:06
  • sorry, but no one can debug your site out of thin air. You need to do basic debuging steps like activating WP_DEBUG and looking into your error log. In adition this might not have anything to do with your changes but an upgrade to 4.8.2 if you enable automatic updates – Mark Kaplun Sep 21 '17 at 13:53
  • Try define( 'WP_MEMORY_LIMIT', '256M' ); This code tells WordPress to increase the PHP memory limit to 256MB. Once you are done, you need to save your changes and upload your wp-config.php file back to your server. – DHL17 Sep 22 '17 at 11:02

It sounds like the white screen of death probably has nothing to do with your functions.php file. I would first disable any and all caching (plugins, server-side, CDN, etc.) and dump full browser history to make sure you're seeing the current version. Then to troubleshoot an issue like this, activate a different theme. If you clear caches again and still get the problem, you've verified something is wrong in the child theme.

If you verify the child theme is indeed the source of the problem, try this: save a backup somewhere, and then on the server, delete everything in the child theme except style.css. That way WP will still recognize it as a child theme, but you can then add files back into the child theme one by one - clear caches, revisit the site, each time you've added one more file - and in this way you can isolate for sure the file that is causing the issue.

Once you know which file is the problem it should become easier to figure out what the specific problem is.

If you find that your child theme has nothing to do with the issue, it could have to do with any number of other things. For instance, a security release of WP Core just came out - perhaps it contained something that conflicts with one of your plugins or your server setup. So if the child theme isn't the culprit, the next thing to do is to deactivate all of your plugins - easiest way to do this is to simply rename the plugins folder on the server, and WP will deactivate them all. Then clear cache and test the site again. If this fixes your issue, rename plugins back to its normal name, and activate one plugin at a time, clear cache, test the site, until you find which specific plugin is having problems.

Not the answer you're looking for? Browse other questions tagged or ask your own question.