Increase the WordPress Memory Limit & Max Memory Limit

  • home
  • /
  • WordPress
  • /
  • Increase the WordPress Memory Limit & Max Memory Limit

Unfortunately when I try to login one of my WordPress website, there is an error inside the wp-admin page Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 56383 bytes) in /custom.php on line 125. Or you may found similar error most of the times, Don’t worry all are WordPress Memory Limit error.

I tried to Search on Google how to increase the WordPress Memory Limit….and I found such a helpful result that solves my problem.
You may find thousands of solutions for that issue but here it is one of the simplest solutions that I want to share with you.

WordPress Memory Limit & Max Memory Limit

First, open your root directory of WordPress and find for “wp-config.php file and open file in your editor. Then add the following lines inside the main PHP tag:

We increased the memory limit to 256MB and Maximum memory limit to 512MB.

If you don’t want to change your wp-config.php file then you can choose the second option also.

For that, you need to update your php.ini file which is also located in the root directory of WordPress (If not exist then simply create php.ini file using FTP).

Now add the following line of code within your php.ini file.

memory_limit = 256M

These both would increase the memory limit to 256 MB.

If you still get the error after these solutions, then please contact your hosting provider.

Note: If you have other solutions for increasing the memory limit, then let us know in the comments below.

  • Share:

Leave a Comment

sing in to post your comment or sign-up if you dont have any account.

9 + 8 =

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

Limited time offer: Manage your WordPress website just for $16