Welcome to the ultimate bro-tier debugging guide. Save this, love this, use this. Whenever your WordPress site breaks and starts acting like a diva, you open this pack and start hunting bugs like a pro.
🎯 1. wp-config.php Debug Settings
Copy & paste this in your wp-config.php file:
// ==== Debug Mode (Switch ON) ====
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors', 0);
// Optional: More power for heavy debugging
define('WP_MEMORY_LIMIT', '256M');
Where’s the log? 📄 /wp-content/debug.log
To live watch errors like a hacker:
tail -f wp-content/debug.log
🛠️ 2. Must-Have Debug Plugins
Install these bad boys:
| Plugin | What it does |
|---|---|
| Query Monitor | Shows slow queries, hooks, errors, HTTP calls |
| Debug Bar | Adds a debug menu in admin bar |
| Health Check & Troubleshooting | Isolate issues without affecting visitors |
| Log Deprecated Notices | Find deprecated functions & warnings |
| User Switching | Swap between user accounts instantly |
📄 3. Quick Commands Cheat Sheet
Some CLI & file tricks:
# Tail debug log
$ tail -f wp-content/debug.log
# Check folder permissions
$ ls -la wp-content
# Clear WordPress transients (cached stuff)
$ wp transient delete --all
🚨 4. Debugging Checklist
Before you freak out, go step by step:
✅ Check wp-config.php debug mode
✅ Deactivate all plugins & test
✅ Switch to default theme (Twenty Twenty-Four)
✅ Clear browser + server cache
✅ Check server PHP logs (/var/log/php/error.log or similar)
✅ Inspect browser Console & Network tab
✅ Test site in LocalWP or staging
✅ Call your bro for emotional support ☎️
😄 5. Optional Meme (For sanity)
“It’s not a bug, it’s a feature.”
🚀 That’s it!
You now have the power of the Debug Ninja. No WordPress site can mess with you anymore.