Increase the WordPress allowed memory size

The default memory limit for WordPress is 32 MB. It is very common to exceed this limit and get the error Fatal error: Allowed memory size. The fatal error message looks similar to this one:

Fatal error: Allowed memory size of 23556632 bytes exhausted (tried to allocate 3349917 bytes) in /home/xxxxx/public_html/wp-includes/plugin.php on line xxx

To increase the WordPress allowed memory size for your website:

  1. Open wp-config.php, which by default is located in the root WordPress directory. 
  2. Find the following line near the end of the file:
    /* That's all, stop editing! Happy blogging. */
    	
  3. Just above that line, add the following line:
    define('WP_MEMORY_LIMIT', '64M');
    	

Save your changes. 

You can also increase memory to a higher number, and you can also increase the memory limit for admin tasks, as described in the WordPress codex.

If you’re still receiving the error after this fix, contact your web host provider or server administrator for their help. 

  • 0 用戶發現這個有用
這篇文章有幫助嗎?

相關文章

Categories and tags have vanished

The problem ended up being that system alerts had caused certain functions to shut down. One of...

Leverage Browser Caching

<IfModule mod_expires.c> ExpiresActive On ExpiresDefault "access plus 1 month"...

How to deactivate all plugins when not able to access the administrative menus?

Sometimes it may be necessary to deactivate all plugins, but you can't access the administrative...

How to Move a WordPress Website from HTTP to HTTPS/SSL

Configuring WordPress for SSL/HTTPS Links in WordPress (such as image attachments, themes CSS...

WordPress Security - Base64 and eval

WordFence has a scanner that can find base64 and eval code. You can use CPANEL file manager to...