Wordpress : Fatal error: Allowed memory … exhauste

2019-09-01 03:53发布

I read through the answers on questions similar to this one, and haven't found anything that has resolved this issue.

I am receiving the following error on various pages on my site.

Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 7680 bytes) in [...]/wp-includes/taxonomy.php on line 2930

The steps I've tried to resolve this are:

  • Request memory in wp-config.php by adding the line "define('WP_MEMORY_LIMIT', '256M');"

  • Increase the memory request for PHP in php.ini by updating the line to "memory_limit = 256M"

  • Running phpinfo() informs me that the memory_limit is (as far as it thinks, I guess) set at 256M.

  • Installed the

  • It seems to help reduce the frequency of these errors by changing the flag in wp-config.php from:

    define('WP_CACHE', true); //Added by WP-Cache Manager
    

    to

    define('WP_CACHE', false); //Added by WP-Cache Manager
    

    but that's obviously not a great solution, as I want caching enabled. That said, I couldn't even log in before I made that change.

  • I installed the WP-Memory-Usage plug-in: I'm apparently using 33.58MB to view the wp-admin/dashboard

There's only a few plug-ins installed, the site is on shared hosting, it receives maybe 5-10 views a day.

Any thoughts on how to resolve the memory issue? Is it an issue with the cache? I have an email out to my webhost.

标签: php wordpress
1条回答
倾城 Initia
2楼-- · 2019-09-01 04:26

From experience, 16MB is very little for a Wordpress installation as it is - WP simply is very fat. If you then have a few plugins running, you will be bound to hit the limit frequently.

Maybe somebody can come up with some memory saving tweaks, but failing that, I think talking to your provider and asking them to raise the limit to 24 or (better) 32MB is the best way to go.

查看更多
登录 后发表回答