Is there a way to search for a missing endif?

I have inherited a WordPress site that I am moving to a new server. On the new server I am getting the following error:

ParseError thrown syntax error, unexpected ‘endwhile’ (T_ENDWHILE)

The site has thousands of files. Is there a quick way to identify which file has the offending ‘endwhile’ statement?

WordPress 4.9.7
PHP 7.0.30

Read more here:: Is there a way to search for a missing endif?

Leave a Reply

Your email address will not be published. Required fields are marked *