How to enable error reporting in php

This tutorial is for those who get Internal Server Error. So your website is not working and you are struggling to find out why. You see Error 500 and do not know what to do next. If you try googling error 500 this will not give you answer you want. The error is too generic and does not tell you exact problem. What you need is to find out what is the real issue.

On 000webhost all errors PHP errors are hidden by default.

To enable displaying PHP errors

  1. Open your website with file manager
  2. Go to public_html directory
  3. Create .htaccess file (if it does not exist already)
  4. add this line: php_value display_errors 1
  5. save file

Now when your website has a problem you will see exactly what the problem is and may google for it.

Remember to remove the line when the problem is solved.

A post was split to a new topic: PHP Wordpress error