Bojan Bojan
Ask AI
I am the Great and Powerful Oz, keeper of Bojan's secrets and his 298 five-star reviews. Step forward and ask, traveler, or tell me who you are and I shall tailor the spectacle.
I'm hiringI have a projectJust curiousAI & platforms
powered by cloudflare workers ai · llama
← All writing
SampleHQNov 18, 20252 min read

You know that ugly WordPress error screen? Yeah… you can replace it.

If you’ve ever built anything serious on WordPress – a SaaS, a dashboard, a customer portal – you’ve definitely seen that screen: White background. Basic serif text. “Error: Something went wrong.” Looks like Windows XP had a panic attack. It’s the fastest way to make a modern product feel 15 years old. Most people assume

If you’ve ever built anything serious on WordPress – a SaaS, a dashboard, a customer portal – you’ve definitely seen that screen:

White background.
Basic serif text.
“Error: Something went wrong.”
Looks like Windows XP had a panic attack.

It’s the fastest way to make a modern product feel 15 years old.

Most people assume it can’t be changed.
But here’s the thing:

You can completely replace WordPress’s wp_die() screen with your own branded, modern, fully designed error experience.

And it changes everything.


Why this matters

Customers judge products in two moments:

  1. When things work beautifully
  2. When things break

WordPress’s default error screen destroys both:

If you’re building anything above simple blogs, this screen breaks trust instantly.

So I replaced it.


What I built instead

My custom wp_die handler turns fatal errors into clean, polished screens that look like part of the app:

Tailwind UI
Dark mode support
Preloader animation
Clear titles like “Access Denied” or “Link Expired”
Friendly messages
Smart redirect buttons
Background shapes and gradients
Full brand feel

It looks like something from Stripe, Notion, or Linear – not… WordPress.

Like this:

Users understand exactly what happened and what to do.


Why this is so powerful

Because out of all features developers obsess over, almost nobody touches error UX.

But your error states are the most emotional moment in the entire product.

If the user sees:

a scary unbranded WordPress error → they blame your product
a clean, intentional message → they trust you handled it

It’s one of the highest-impact UI upgrades you can make.


Yes – you can implement this right now

This isn’t a hack.
It’s WordPress-native:

add_filter('wp_die_handler', function() {
    return 'sf_custom_wp_die_handler';
});

From there, your handler renders a full custom HTML page (Tailwind, Alpine, dark mode, whatever you want).

WordPress does the rest.


The result?

Your platform feels like a real product, not a CMS with plugins glued to it.

This is a small detail, but small details build trust – and trust keeps users inside your app.


Want the full code?

Check out the GitHub gist.

Related writing
Jun 13, 2026

From Zapier to AI Agents: The Four Levels of Business Automation

Jun 03, 2026

Every WordPress Error Page Beyond 404 Is Broken. I Built a Plugin to Fix Them.

May 29, 2026

Your Git Log Is a Legal Document