php - How to simulate an HTTP 500 error on my Wordpress site?

307

I want to simulate this error so I can check the custom HTTP 500 page is displayed, not the default one.

779

Answer

Solution:

Throw a .htaccess with some weird symbols in your document root and call the page

You can break one of the RewriteRules of WordPress if you already have a .htaccess Just make sure you know what you broke haha

230

Answer

Solution:

If you deliberately break some code on the site it should display the 500 page.

796

Answer

Solution:

Hmm you can't have custom 500 error page on wordpress as far as i know.

But give this a try on your .htaccess and let know ;)

ErrorDocument 500 /500.shtml

People are also looking for solutions to the problem: php - !$variable = $variable inside if

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.