WordPress Fatal error: allowed memory size of X bytes exhausted

WordPress Fatal error: allowed memory size of X bytes exhausted

Through this tutorial, you will learn how to fix fatal errors: allowed memory size of 8388608,16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824 bytes exhausted (tried to allocate x bytes) in /home/site/public_html/wp-content/plugins , /wp-include, /wp-admin wordpress.

How To Fix fatal error: allowed memory size of x bytes exhausted wordpress

Here are some methods to fix fatal errors: allowed memory size of 8388608,16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824 bytes exhausted (tried to allocate x bytes) in /home/site/public_html//wp-content/plugins, /wp-include, /wp-admin wordpress.

  • Method 1: Edit the wp-config.php file
  • Method 2: Edit php.ini
  • Method 3: Edit the .htaccess file

Method 1: Edit the wp-config.php file

Visit your WordPress root directory and find the directory of the wp-config.php file. Then open it and add the following line of code into it:

define( 'WP_MEMORY_LIMIT', '1024M' );

Method 2: Edit php.ini

Now, you need to open php.ini file and add the line “memory_limt =” with limit; is as follows:

 ini_set('memory_limit', '1024M'); //

Method 3: Edit the .htaccess file

Visit your WordPress root directory and find the directory of the .htaccess file. Then open it and add the following line of code into it:

php_value memory_limit 256M

Recommended Tutorials

AuthorAdmin

My name is Devendra Dode. I am a full-stack developer, entrepreneur, and owner of Tutsmake.com. I like writing tutorials and tips that can help other developers. I share tutorials of PHP, Python, Javascript, JQuery, Laravel, Livewire, Codeigniter, Node JS, Express JS, Vue JS, Angular JS, React Js, MySQL, MongoDB, REST APIs, Windows, Xampp, Linux, Ubuntu, Amazon AWS, Composer, SEO, WordPress, SSL and Bootstrap from a starting stage. As well as demo example.

Leave a Reply

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