I create a theme from scratch, everything works OK, but as soon as I create the functions.php file (empty), the site stops working and gives an error 500, even in the admin panel. What could be the problem?

  • And try not to be empty, at least to create a php tag for '<? Php' and the problem should go away. The tag should be in the first line, without any spaces - eugene_v

2 answers 2

Enable debug in the wp-config file, then refresh the page on the site and then the debug.log file will appear in the wp-content folder, and the reason for the error will be written there.

Here it is the 6th way:

https://www.hostinger.com.ua/rukovodstva/kak-ispravit-oshibku-500#-5

If the file does not appear in the folder, then turn on to view hidden files and folders if you use FileZilla

    one functions.php when creating a theme is not enough, there must be another style.css