WordPress Fatal Error Theme

Fixing Fatal Error PHP Memory Allocation in WordPress

Fatal error: Permitted memory size of 33554432 bytes exhausted (tried to allocate 7680 bytes) within /home/xyz/public_html/abc/tuv/wp-includes/kses.php(1005) : runtime-created functionality on line 1

Memory space Allocation in PHP evidently is the most common fatal error / problem that WordPress users might have come across. PHP by some aspects consume memory space on the machine. Your hosting provider might either allocate the actual memory or may even enable you to increase the allocation. The majority of hosting providers may possibly allocate only 8MB regarding PHP. Normally, one installation of WordPress could make PHP consume atleast 16MB of memory. Additionally, there are prospects that you are using some other PHP application or perhaps CMS on your server which is taking away the specific PHP memory. In all these kinds of cases where memory space is not sufficient, WordPress throws an error which is in this format:
“Allowed memory space size of NNN bytes exhausted”.

Solution regarding PHP Memory Allocation:

Firstly, find out if you have the privileges to change memory space allocation. If you do not possess this, proceed directly to your hosting company to increase the actual PHP memory limits. If you have the privileges to change memory allocation, after the change, open wp-config.php file within a text editor by adding this line:
define( ‘WP_MEMORY_LIMIT’, ’64M’ );
You can modify 64M to the preferred value. You need to include this line just over this line:
/* That’s just about all, stop editing! Happy blogging folks*/

By writing this particular piece of code, you will be instructing WordPress to boost PHP Memory allocation solely for WordPress only. This will most likely resolve all of the errors triggered due to lesser PHP memory allocation.

Increasing memory space allocated to PHP:

Introduced with Version 2.5 the actual WP_MEMORY_LIMIT option enables you to specify the maximum amount associated with memory that can be taken by PHP. This setting might be necessary in case you receive a message for example “Authorized memory size of xxxxxx bytes exhausted”.

WordPress will find out if PHP has been allocated less memory compared to entered value prior to utilizing this function. For instance, if PHP continues to be allocated 64MB, there is no need to put this value to 64M because WordPress will certainly use all 64MB.
Please be aware, this setting might not work if your host will not allow for increasing the actual PHP memory limit in which case, contact your host to enhance the PHP memory limit. Also, remember that many hosts set the actual PHP limit at 8MB.
Enhance PHP Memory towards 64MB
define( ‘WP_MEMORY_LIMIT’, ’64M’ );
Increase PHP Memory towards 96MB
define( ‘WP_MEMORY_LIMIT’, ’96M’ );

Administration responsibilities require a lot memory than normal operation. When in the management area, the memory could be increased or reduced from the WP_MEMORY_LIMIT by determining WP_MAX_MEMORY_LIMIT.
define( ‘WP_MAX_MEMORY_LIMIT’, ‘256M’ );
Please be aware, this has to be put prior to WordPress settings. PHP inclusion by adopting this way you can easily allocate memory.

This is how you can fix this fatal error so now don’t get panic and just follow these stepts. If you know any other easy way to fix this fatal error, then do share it in the comments.

Leave a Reply

Your email address will not be published. Required fields are marked *