Question

If I try to upgrade to PHP 7 or up (from 5.6), I have one site that is throwing a PHP error.

I have tried uninstalling all plugins and activating the Twenty Twenty theme before changing PHP version. No dice.

Is there a setting in the database or core that would be effecting this? I also tried a default .htaccess file.

EDIT: WP debug.log says:

[10-Mar-2020 23:35:45 UTC] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 32768 bytes) in /path/public_html/wp-includes/formatting.php on line 1600
[10-Mar-2020 23:35:45 UTC] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 32768 bytes) in /path/public_html/wp-includes/version.php on line 1

But this seems unrelated, right? The site is having i/o issues as well.

Was it helpful?

Solution

try doing wp_debug true and if the issue is of memory allocation try allocating memory in the wp-config

define('WP_MEMORY_LIMIT', '64M');

If it is not fixed try increasing the memory limit.

OTHER TIPS

'500' errors are really hard to debug. It's sort of a 'something went wrong but I got no details that will help you figure out what went wrong'. Even the error message that you put in your question is not that helpful. And any help via the googles/bings/ducks are all over the place.

There are settings in php.ini that you can do to increase available memory; you may need to talk to your hosting place to increase memory that is available to PHP.

You might also try a generic/base wp-config.php and wp-settings.php file in case there are some modifications that have been done there.

I'd go with adjusting memory settings in the php.ini file, and looking at any memory settings in the wp-config.php file. You might also try a new install of WP with nothing else and place it in a subfolder of your public_html file. Then you can set up that instance with PHP 7.3 with whatever settings that are done via your hosting place (you can have different PHP versions running in different subfolders).

Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange
scroll top