Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 71 bytes)

前端 未结 3 787
悲哀的现实
悲哀的现实 2020-12-05 06:32

I\'m getting an error when I try to open one of my dashboard pages in my wordpress script

The error message is as follows:

Fatal error: Allowe

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-05 07:01

    WordPress overrides PHP's memory limit to 256M, with the assumption that whatever it was set to before is going to be too low to render the dashboard. You can override this by defining WP_MAX_MEMORY_LIMIT in wp-config.php:

    define( 'WP_MAX_MEMORY_LIMIT' , '512M' );
    

    I agree with DanFromGermany, 256M is really a lot of memory for rendering a dashboard page. Changing the memory limit is really putting a bandage on the problem.

提交回复
热议问题