Running into the error "Fatal error: Allowed memory size of ... bytes exhausted (tried to allocate ... bytes) in /path/to/wp-includes/some.php on line xyz" ?
Note: I had my page cut off for no obvious reason. In a case like that I usually first look in Console log of my browser (eg. F12 in Google Chome) to see if something obvious can be seen there. If that doesn't clarify anything, then I briefly enable the debugging in Wordpress, by changing or adding these settings in the wp-config.php file in the root of your Wordpress directory:
Enable debugging:
/*
define('WP_DEBUG', false);
define('WP_DEBUG_DISPLAY', false);
define('WP_DEBUG_LOG', false);
define('SCRIPT_DEBUG', false);
*/
define('WP_DEBUG', true);
define('WP_DEBUG_DISPLAY', true);
define('WP_DEBUG_LOG', true);
define('SCRIPT_DEBUG', true);
Reload the affected page after saving the wp-config.php file and see if there are errors visible (viewing the page source may be needed).
After that I quickly revert back by changing the text in wp-config.php back to:
Disable debugging:
define('WP_DEBUG', false);
define('WP_DEBUG_DISPLAY', false);
define('WP_DEBUG_LOG', false);
define('SCRIPT_DEBUG', false);
/*
define('WP_DEBUG', true);
define('WP_DEBUG_DISPLAY', true);
define('WP_DEBUG_LOG', true);
define('SCRIPT_DEBUG', true);
*/
So this is where I ran into the error which basically tells me that PHP/Wordpress did not have permission to allocate enough memory. Seems by default, WordPress automatically tries to increase PHP memory limit if it is less than 64MB. But most of the time 64MB is not high enough.
There are a few ways to increase the allowed memory allocation, but you'll need to set it for Wordpress as well.
Here we edit the wp-config.php file again and add the following line somewhere before the "That’s all, stop editing! Happy blogging." comment:
define( 'WP_MEMORY_LIMIT', '256M' );
This code tells WordPress to increase the PHP memory limit to 256MB. Obviously up to you what value you use here. Do not go overboard, and keep in mind that you may have to update the php.ini file as well.