A few minor versions ago I found that the automatic feature to upgrade the core WordPress engine stopped working. Specifically, upon clicking the ‘Upgrade Automatically’ button, the process said it was downloading the zip but then just hung. I’ve been putting off troubleshooting it.

Upon looking at the PHP log, I saw the following error:

PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2357046 bytes)

This means that the process needs more memory (RAM) to run that it is allowed. With a little research I found that the solution is in the WordPress documentation.

By adding the following line to wp-config.php, we boost the limit of memory which may be allocated to WordPress processes.

define(‘WP_MEMORY_LIMIT’, ’64M’);

Sure enough, after updating the file the upgrade ran successfully.