Local Router Error - php error : Allowed memory size

Please help me! I have this error when I try to open a page in my site. I am stuck for 3 days. I looked in logs I have this error:

[20-Jun-2018 11:27:58 UTC] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 8192 bytes) in /app/public/wp-includes/wp-db.php on line 2426
[20-Jun-2018 11:27:58 UTC] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 8192 bytes) in /app/public/wp-includes/wp-db.php on line 2426
[20-Jun-2018 11:27:58 UTC] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 8192 bytes) in /app/public/wp-includes/wp-db.php on line 2426
[20-Jun-2018 11:27:58 UTC] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 8192 bytes) in /app/public/wp-includes/wp-db.php on line 2433
[20-Jun-2018 11:28:09 UTC] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 8192 bytes) in /app/public/wp-includes/wp-db.php on line 2426
[20-Jun-2018 11:28:13 UTC] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 65536 bytes) in /app/public/wp-settings.php on line 98
[20-Jun-2018 11:28:17 UTC] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 65536 bytes) in /app/public/wp-settings.php on line 98
[20-Jun-2018 11:28:23 UTC] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 65536 bytes) in /app/public/wp-settings.php on line 98
[20-Jun-2018 11:28:31 UTC] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 65536 bytes) in /app/public/wp-settings.php on line 98

I work on the prefered environment.

I changed ‘WP_MEMORY_LIMIT’ in wp-config.php but it does not change anything.
What can I do ? Help me please. it’s urgent

@zora,

Please also increase WP_MAX_MEMORY_LIMIT to the same amount that you set WP_MEMORY_LIMIT to.

Thanks for the information. I did the same steps in order to fix the issue in my site https://redserverhost.com and it worked.

Nice Tutorial!!

1 Like