Quantcast
Channel: Topic Tag: error 500 | WordPress.org
Viewing all articles
Browse latest Browse all 1711

Redirect to custom page on fatal error

$
0
0

Hi,

when a plugin or theme causes a fatal error, WordPress shows the message “there has been a critical error on your website”.

Is it possible to redirect users to a custom error page in this case?

Something like this:

if ( is_critical_error() )
{
    wp_redirect( "https://mywebsite.com/critical.html" );
    exit;
}

Thanks. 🙂


Viewing all articles
Browse latest Browse all 1711

Trending Articles