How to fix WordPress Error – Fatal error: Allowed memory size of 268435456 bytes exhaustedWordpress Error ?

The most webmaster of the world are using WordPress as a best CMS for their website. Because wordpress is an opensource Content Management system which is update and also is FREE

As you see I am using wordpress CMS from this website and other websites too. I also am using wordpress for my customers as a website designer.

But as you know nothing is complete and must be better and update is one of the most important thing for your website. You must remember updating of wordpress and also wordpress plugins is so important for you website SEO score, Website speed and website security !

for example one day I see this error for my wordpress website:

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 1331200 bytes) in /home/indexhtt/public_html/y22.ir/wp-includes/class-wp-scripts.php on line 464

At first look you think must go to home then to wp-inclode folder and edit class-wp-scripts.php

But this is mistake!

How to fix wordpress eoor – Fatal error

If you see below error for your wordpress website

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 1331200 bytes) in /home/indexhtt/public_html/y22.ir/wp-includes/class-wp-scripts.php on line 464

You need to go to your wp_config.php in root

Then search

define( ‘WP_MAX_MEMORY_LIMIT’, ‘256M’ );

and change limit from 256 to 512

I mean

define( ‘WP_MAX_MEMORY_LIMIT’, ‘512M’ );

If you enjoy it?

You can invite me for a coffee here

notice:

You may see this error for any section of your wordpress CMS . in plugins folder and etc…

If you see this error

PHP Fatal error: Allowed memory size

must edit this command in wp-config.php

define( ‘WP_MEMORY_LIMIT’, ‘512M’ );

World.mmd.name