Webstick.blog logo Wordpress, Design, SEO, Speed blog

Fatal error allowed memory size Wordpress 💥

Fatal error allowed memory size Wordpress


Obviously not enough Memory Limit is allowed by the server. Your website needs a higher limit. So we're going to increase it.


Advertisement

Divi Ad 680px


Fix error allowed memory size WP with WHM

If you have access to the server where your website is located, you can easily scale up the memory size. Log in to WHM. Go to "MultiPHP INI Editor". If you have multiple PHP versions on the server, set the one that is responsible for the problem with your Wordpress website. Scroll down where it says "memory_limit" and immediately make it 256M or even 512M.


Fix allowed memory size Wordpress with WHM


Fix allowed memory size Wordpress with Cpanel

If you do not have access to the complete server, but you do have access to the hosting where your website is located, you can do exactly the same with Cpanel. The condition is of course that the WHM administrator allows the "MultiPHP INI Editor" in your panel.


Fix allowed memory size Wordpress with Cpanel


What these both methods using WHM or Cpanel actually do is fixing the error of the allowed memory size WP in the php.ini file. You can find this file in the root of your hosting but I don't recommend messing with it manually.

Fix error allowed memory size WP with wp-config.php

You will first need to edit your WordPress site's wp-config.php. You will find it in your WordPress site's root directory. To edit it, you will need an FTP client or Cpanel. The next step is to copy the following code into wp-config.php just at the end.

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

Fix error allowed memory size WP with .htaccess

The .htaccess file does not have so much content as the php.ini file and editing it to fix the error of not having enough memory for your Wordpress site is definetely an option. Be sure you have set your hosting to show hidden files. You find .htaccess in the public_html of your hosting. Add the following code to it right at the bottom:

php_value memory_limit 256M


Advertisement

Divi Ad 680px



Scroll up