Use WP-CLI to Identify a Plugin That Causes a 500 Error

Do not attempt this on a production website, create a staging and try debugging there

1. Create a list with all the active plugins

wp plugin list --status=active --field=name > plugins.txt
ShellScript

2. Deactivate the plugins one by one and curl the HTTP response

awk '{print $1}' plugins.txt | while read a; do wp plugin deactivate $a --skip-plugins && curl -sILX GET https://staging.kipreos.me/ | head -n 1 && wp plugin activate $a --skip-plugins; done
ShellScript

The script will deactivate the plugins one by one and check the HTTP response. Once the plugin that creates the problem is deactivated you will see the curl check returning an HTTP/1.1 200 OKresponse.

3. Enable again all the necessary plugins to restore the site to the previous condition

awk '{print $1}' plugins.txt | while read a; do wp plugin activate $a --skip-plugins; done
ShellScript