Add to Favourites    Print this Article

wordpress Fatal error Allowed memory size of 41943040 bytes exhausted.

Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 30720 bytes) in /home/campeone/public_html/wp-admin/includes/post.php on line 857

This solution apply to all Fatal errors related to the memory size. Follow the steps below and you will never have Fatal error again.

Login in to your cpanel
eg www.yourdmain.com/cpanel
locate and click on File Manager
under Public_html click on wp-includes
under wp-includes click on default-constants.php to highlight and click edit
locate the line below and change the default memory value to

define('WP_MEMORY_LIMIT', '64M');
        } else {
            define('WP_MEMORY_LIMIT', '120M');
        }
    }

    if ( ! defined( 'WP_MAX_MEMORY_LIMIT' ) ) {
        define( 'WP_MAX_MEMORY_LIMIT', '256M' );

and click save.
the memory error will be corrected


Video Tutorial
https://www.youtube.com/watch?v=ojCnNgvWt9E

If you have difficulty understanding the tutorial kindly open a support ticket we will shedule time i demostrate it via teamviewer to you.



Yes No

Also Read