Easy way to fix Fatal error: Allowed memory size of x bytes exhausted

Easy way to fix Fatal error: Allowed memory size of x bytes exhausted

Fatal error: Allowed memory size of 41943040 bytes exhausted

I got Fatal error Allowed memory size of 41943040 bytes exhausted and I found a very easy way to fix this error. It is very exciting. This solution apply to all Fatal errors related to the memory size. Follow the steps and never have Fatal error again.

1) Login FTP
2) Open file : wp-includes > default-constants.php
3) change line 23

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

Jayesh Patel
Author
Jayesh Patel

Jayesh Patel is a Professional Web Developer & Designer and the Founder of InCreativeWeb.

As a highly Creative Web/Graphic/UI Designer - Front End / PHP / WordPress / Shopify Developer, with 14+ years of experience, he also provide complete solution from SEO to Digital Marketing. The passion he has for his work, his dedication, and ability to make quick, decisive decisions set him apart from the rest.

His first priority is to create a website with Complete SEO + Speed Up + WordPress Security Code of standards.



Explore

Related Articles

18th January, 2025

Best 5 Elementor WordPress Themes (2025)

13th January, 2025

Three Easy Steps to Web Publishing on Github Pages

10th January, 2025

How to Avoid the Top 7 Web Design Errors That Degrade Your SEO

6th January, 2025

Top WordPress Social Media Plugins for 2025