WordPress Memory Limit Shows 40MB even after raising PHP memory limit

If you here on this article that means you already know about WordPress Memory and PHP memory limit and I don’t need to explain them. The thing is to install high performance demanding themes and plugins you need to increase the WordPress Memory Limit. By default, the WordPress Memory Limit is 40M and to increase this first you should be aware of the maximum memory assigned or available for PHP. If you want to find out the max PHP memory then see our article: How to check PHP memory limit in WordPress.

Coming to the main topic, many times even after increasing the amount of WordPress Memory Limit by defining a simple piece of code which I will let you know in this article, still at the WordPress Dashboard or in some plugin it shows 40M only. If you too facing this issue then the solution is here…

To increase the WordPress Memory from 40M to 60M, 215M, 312M, 512M or whatever, it totally depends on the availability. Let say you want to increase the memory from 40M to 215M; what you have to do:

Set the PHP memory limit for WordPress Memory

  1. Go to your Cpanel of hosting service where the WordPress website is hosted or just access root file system public_html using FTP software.
  2. Find out a file called wp-config.
  3. Select and click on the edit option given in the top menu of cPanel.
  4. Now here is the tricky part of adding a small piece of the code:
    define( 'WP_MEMORY_LIMIT', '215M' );
    • Note: If you want to increase the memory to 128, 315, 512 or according to your requirement just replace the M value mentioned in the above code.
  5. If you want to increase the WordPress memory just copy and paste the above code in the WordPress wp-config file.
  6. Now the question arises where to paste this code. Most of the time people paste it at the end of the file and it works too but on your WordPress Dashboard or Plugins installed still consider only 40M even after defining 215M.
  7. So, what you have to do rather placing it at the end, paste it at the very beginning of the wp-config file just after  <?php code.  In this way, your WordPress memory limit increases and it will also show the same on the Dashboard for plugins.                                             WordPress memory limit 40M

If you face any problem or unable to understand something then comment and will instantly reply. You can also contact us via email.

3 thoughts on “WordPress Memory Limit Shows 40MB even after raising PHP memory limit”

  1. Followed your directions as far as I can tell to the T… Still no such luck with increasing WP limit

    Reply

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.