How to Increase PHP Memory Limit in WordPress

If you are getting an error “the allowed memory size limit exhausted” in your WordPress website, that means you are in a trouble. Your website can’t be  open by any visitor in this world. It may be a bad impression on your visitors. It can also effect your online business. But you don’t worry about anything else after reading this blog. I am sharing with you very easy steps to fix this issue.

What is PHP Memory Limit?

PHP is a type of language to design web programs. It is a programming language to design dynamic and unique web pages. WordPress is also written in PHP programming language. PHP is server side scripting language. When a user allows a web page to work with PHP codes. It automatically generates HTML output to be displayed on the browser screen on the computer.

PHP Memory limit is a RAM of your website. Every WordPress website needs a website server hosting.  These web servers are something just like a computer. They also need memory to run a website and its applications.

A new WordPress website hosting provider makes a memory limit for their users. You have to increase that limit if you want. When you have crossed the memory limit to run your website. You will be seeing an error when visiting your website. This error may be something like this.

Fatal error: Allowed memory size of 33445532 bytes exhausted (tried to allocate 2483617 bytes) in /home4/xxx/public_html/wp-includes/plugin.php on line 256

This error will show on your website page when you will try to open it. I will tell you today very easy steps to fix this issue.

Easily Increasing PHP Memory Limit in WordPress

In your WordPress site root folder, there is a file named wp-config.php. You can use cpanel to find your root folder into the file manager. If you don’t have access to cpanel. Then you should use FTP file manager to resolve this issue.

After that, You will have to paste a code into the wp-config.php file. You need to enter in this wp-config.php file and find out the line “That’s all, stop editing! Happy blogging”. If yo can’t find out the line, tap Ctrl+F and type these words and enter the search button. You will get these lines. Now paste the code just above the line “That’s all, stop editing! Happy blogging” and save the file as it is.

define( ‘WP_MEMORY_LIMIT’, ‘256M’ );

This will increase your WordPress site PHP memory limit to 256 MB.Now, You can visit your website and the error has gone. This may be good news that your site is again running up.

IMPORTANT: If your site is showing still this error, it means you hosting provider is not allowing WordPress to increase the memory limit. Now you should talk to your web host technical support team to solve this issue for you.

If you get helped by this article. It’s our pleasure to make you happy. You may also like our another blog How to Fix An Error Establishing a Database Connection.

If you loved this helpful article, So don’t forget to share this article with your friend and join us on Facebook and Twitter.

 

Web Hosting

22 Comments

  1. BD TipsBoss April 3, 2017
  2. surendra April 4, 2017
  3. Jay Patel April 5, 2017
  4. aarti April 5, 2017
  5. Monisha Kapoor April 12, 2017
  6. Abrar April 20, 2017
    • Farukh Hussain April 20, 2017
      • Abrar April 25, 2017
  7. Kamal April 22, 2017
  8. swapnil April 22, 2017
  9. Dheeraj gopa April 23, 2017
  10. VISHAL KUMAR April 24, 2017
  11. bhavesh April 25, 2017
  12. esha gupta April 25, 2017
  13. Vivek Kumar Jaiswal April 26, 2017
  14. Avani April 26, 2017
  15. amitkumar April 26, 2017
  16. RB Sharma April 28, 2017
  17. bhavesh April 29, 2017
  18. Manan April 30, 2017
  19. Kumaran April 30, 2017
  20. Rahul May 24, 2017

Leave a Reply