I have a WordPress website on a shared hosting plan and recently I switched from PHP 5.6 to PHP 7.1. It took me a while to notice intermittent 500 internal server errors and I still haven't been able to solve this issue. Now, the interesting thing is that I managed to reproduce these errors in all 7.x (7.0, 7.1, 7.2 and 7.3) PHP versions but only on the shared server. I tried running the website locally in Wamp on these PHP versions and I was not able to reproduce the error. The error occurs completely randomly - on any page (cached or not).
I tried the following:
- Checked/fixed permissions
- Reinstalled WordPress core files
- Disabled all plugins
- Changed theme to twenty seventeen
500 errors still occur. Could this be a server problem? The hosting provider of course denies that, and according to them there is nothing in the Apache error log.
They use Apache servers and Nginx as a reverse proxy. I'm not an expert in server technology and I would like to get a bit more info on what could cause such errors before I switch to another hosting. I find it interesting that the errors do not occur in PHP 5.6.