Grow the memory limit in WordPress

Do you have a website that runs with WordPress CMS; You may be interested in this article. One of the common mistakes in WordPress, especially on web pages that are "overloaded" is that the default memory is not enough for everything to run properly. This presents type errors

wp-admin page Fatal error: Allowed memory size of 33554432 bytes exhausted in /myphpfile.php on line 122880

See more articles from iGuRu.gr when you search for news on Google.

wordpressIf you try to find a solution from Google, many will refer you to edit the wp-config.php file to increase the memory limit set by WordPress. But the WP_MEMORY_LIMIT that you are told to "tease" does not exist in the file. So before you start adding extra code to this file, try opening the default-constants.php file from / wp-includes /.

The memory settings that WrrdPress 4 uses and include WP_MEMORY_LIMIT are in default-constants.php. Change the values ​​as shown below and you are ready.

 // set memory limits if ('defined' ('WP_MEMORY_LIMIT')) {if (is_multisite ()) {define ('WP_MEMORY_LIMIT', '64M'); } else {define ('WP_MEMORY_LIMIT', '40M'); }}

Change it to

// set memory limits if ('defined' ('WP_MEMORY_LIMIT')) {if (is_multisite ()) {define ('WP_MEMORY_LIMIT', '64M'); } else {define ('WP_MEMORY_LIMIT', '96M'); }}

If the problem persists, contact the server administrator to change the PHP memory limit.


Google preferences

Leave a Comment

Your email address is not published. Required fields are mentioned with *

Your message will not be published if:
1. Contains insulting, defamatory, racist, offensive or inappropriate comments.
2. Causes harm to minors.
3. It interferes with the privacy and individual and social rights of other users.
4. Advertises products or services or websites.
5. Contains personal information (address, phone, etc.).