Monday, 19 February 2018

WordPress Memory Exhausted Error

I've got allowed memory size exhausted error in WordPress. Well not for the first time and I guess it's not the last time.

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 12288 bytes) in /home/user/public_html/wp-admin/includes/menu.php on line 65

So the I increase PHP Memory Limit in WordPress in one easy step, by editing the wp-config.php file on the WordPress site. It is located in the WordPress site’s root folder, and you will need to use an FTP client or file manager in your web hosting control panel.

Add this line:

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

before the line that says ‘That’s all, stop editing! Happy blogging.’

This tells WordPress to increase the PHP memory limit to 256MB And once you are done, you need to save your changes and upload your wp-config.php file back to your server, or save your file in the file managers editor.