Friday, April 22, 2022

fixing wordpress errors after server upgrade

A wordpress site was not loading after a server upgrade. Just a blank screen. To troubleshoot, first checked database connectivity, database password in wp-config - that was working. Then, tried to get more information about the error by changing the define( 'WP_DEBUG', false ); - changed to true. Then the error showed up - Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 65536 bytes) in /home/websitename/public_html/wp-content/plugins/woocommerce/includes/class-wc-ajax.php on line 1101

Fixed it using the solution at 
by adding 
ini_set('memory_limit','128M');
to the top of wp-config.php

Problem solved. Set the WP_DEBUG variable back to false. 

No comments:

Post a Comment