Mahamudul Hasan Rubel
HomeAboutProjectsSkillsExperienceBlogPhotosContact
Mahamudul Hasan Rubel

Senior Software Engineer crafting high-performance web applications and SaaS platforms.

Navigation

  • Home
  • About
  • Projects
  • Skills
  • Experience
  • Blog
  • Photos
  • Contact

Get in Touch

Available for senior/lead roles and consulting.

bd.mhrubel@gmail.comHire Me

© 2026 Mahamudul Hasan Rubel. All rights reserved.

Built with using Next.js 16 & Tailwind v4

Back to Blog
WordPressJune 20, 20264 min read

Debugging the WordPress white screen of death: A Pro Guide

Debugging the WordPress white screen of death is easier when you stop guessing. Learn to enable debug logs, trace errors, and restore your site in minutes.

WordPressDebuggingPHPTroubleshootingWeb DevelopmentTutorial
Focused view of programming code displayed on a laptop, ideal for tech and coding themes.

The White Screen of Death (WSoD) is the ultimate developer panic trigger. You refresh your browser, expect your latest feature to appear, and instead, you’re greeted by a blank, featureless page. No error message, no stack trace, just silence.

I’ve spent hours staring at these blank screens on production environments, initially trying to "guess" which plugin was the culprit by disabling them one by one. That’s a waste of time. When you're debugging the WordPress white screen of death, you need hard data, not intuition.

Step 1: Force WordPress to Talk

By default, WordPress hides errors to prevent sensitive path information from leaking to end users. That’s great for security, but terrible for debugging. You need to flip the switch in your wp-config.php file.

Open your site’s root directory via SSH or FTP and edit wp-config.php. Search for WP_DEBUG and change it to true. Add these lines right below it to ensure the errors are written to a file instead of printed directly onto your broken page:

PHP
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );

Once you save this, try to trigger the white screen again. WordPress will now create a debug.log file inside your /wp-content/ directory. Open that file, and you’ll likely see the exact line of code causing the crash, usually related to a function call, a missing file, or a memory limit issue.

Why You Shouldn't Rely on "Disable All Plugins"

Early in my career, I would rename the plugins folder to plugins_old to force a reset. It works, but it's a blunt instrument. It doesn't tell you why the site broke.

If you’re working on a site where you’ve implemented custom post types without a plugin, the error might actually be in your theme’s functions.php or a custom logic block, not a plugin at all. By enabling the log, you pinpoint the specific file. I once spent three hours disabling plugins, only to realize the issue was a syntax error in a custom hook I had just added to a site's core logic. If I’d checked the logs first, I would have found the error in about 30 seconds.

Common Culprits

When debugging the WordPress white screen of death, the log usually points to one of these three suspects:

  1. Memory Exhaustion: If your log says "Allowed memory size of X bytes exhausted," your server is hitting its PHP limit. You can try bumping this in wp-config.php with define( 'WP_MEMORY_LIMIT', '256M' );, but be aware that this is often a symptom of bad code, like an infinite loop or an inefficient query.
  2. Syntax Errors: If you recently edited a file, check for missing semicolons or unclosed brackets. PHP is unforgiving.
  3. Plugin Conflicts: If you're using hooks and filters done right, you might have a filter that expects an object but receives null, causing a fatal error when trying to access a property.

When the Logs Are Empty

Sometimes, the screen is white, but the log remains empty. This happens when the crash occurs before WordPress even loads—often because of a server-level configuration issue or a broken PHP extension.

Check your server’s error logs (usually in /var/log/apache2/error.log or /var/log/nginx/error.log on Ubuntu/Debian). If you're on a managed host, look for the "Server Logs" section in your control panel. If the server logs are also empty, you might be dealing with a PHP version mismatch. I once saw a site crash because a plugin used PHP 8.0 syntax on a server running 7.4.

What I’d Do Differently

Next time I face a total site failure, I’ll reach for the WP_DEBUG logs immediately. I’ve learned that trying to "fix it in production" by memory is a recipe for more downtime.

If you are dealing with complex site architectures, remember that hardening a WordPress site you actually ship includes knowing your environment's logging capabilities before the incident happens. Don't wait for the white screen to figure out where your logs are stored.

FAQ

Q: Can I leave WP_DEBUG on in production? A: No. Set WP_DEBUG_DISPLAY to false. This keeps the log file active for you to check, but prevents visitors from seeing path leaks if something goes wrong.

Q: My site is white, but the debug log isn't updating. Why? A: Check file permissions on the wp-content folder. If the web server user (like www-data) doesn't have write access, it can't create or update the log file.

Q: Is there a way to prevent this during development? A: Always test your code in a local environment using tools like LocalWP or Docker before pushing to production. If it crashes locally, you’ll see the error immediately without impacting your live users.

Debugging the WordPress white screen of death is a rite of passage for any developer. It’s frustrating, but it’s also the fastest way to learn how your code interacts with the server. Keep your logs close, keep your code clean, and don't panic.

Back to Blog

Similar Posts

Close-up of a vintage typewriter with paper labeled Wordpress.
WordPressJune 20, 20264 min read

Enqueuing scripts and styles the correct way in WordPress

Enqueuing scripts and styles the correct way is essential for site performance. Learn to manage assets using wp_enqueue_scripts to avoid conflicts.

Read more
Close view of computer screen displaying HTML code with an authentication error.
WordPress
June 20, 2026
4 min read

Custom post types without a plugin: A Developer’s Guide

Learn to create custom post types without a plugin using native WordPress functions. Control your data structure and keep your site lightweight and fast.

Read more
Creative flat lay of gadgets and 'Beginners Guide' text on wooden table.
WordPressJune 20, 20264 min read

Your first WordPress hook: A beginner’s guide to customization

Your first WordPress hook is the key to modifying site behavior safely. Learn how to use actions and filters to extend functionality without touching core.

Read more