Wordpress: Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 2 bytes)

Asked

Viewed 1,176 times

1

Does anyone know how to fix this error? I’ve already set up the wp-admin.php file and . htaccess, but it still has the same error

  • also already sent php.ini file.

1 answer

2

Your code may be in an infinite loop, causing high consumption of server resources. Another reason that causes this is a page with many pictures with wrong file path. You can try increasing the resources available for your PHP, in the php.ini file, search for:

memory_limit = 128M;

Increase to 512 for example and see if the problem continues.

Also, you can try putting this in your config.php:

ini_set('memory_limit', '-1');

Try to find the reason for the high consumption. Restart the server after the changes. If you use cPanel in your hosting, the change of memory limits should be done there.

  • I added ";" at the end of each statement in the php.ini file, put "ini_set('memory_limit', '-1');" in wp-config.php. And it didn’t resolve. My hosting is shared, I can’t restart the server. I just can’t get into Admin. the site is working normally.

  • Your hosting uses Cpanel?

  • Uses cPanel yes.

  • 1

    Then it is through Cpanel that you will change the memory limit.

  • @Stéfano because broken links cause high memory consumption?

  • 1

    I expressed myself badly, are the images with broken file path.

Show 1 more comment

Browser other questions tagged

You are not signed in. Login or sign up in order to post.