General Topics

The Truth About Allowed Memory Size Exhausted Error

Here you will able to read about allowed memory size exhausted error. Let’s more read about how to fix allowed memory size of bytes exhausted error. While using open source software like WordPress, Joomla or Moodle the error face sometimes. But don’t worry that’s a simple error which can easily fix by simple steps. If you want to rid of “Allowed memory size error” then increase the memory limit. Furthermore, you can increase memory limit by using the php.ini file from the public_html folder. However, when you are facing the error then you see on your screen like shown below:

Fatal error: Allowed memory size of 268435465 bytes exhausted 
(tried to allocate 280559520) in Unknown on line 0

The reason of this error is PHP script which is running but not cleared from the memory.

Note: If you are using open source software then no need to make a change in the coding. But if you are not a user of open source software then use an unset() function to clear the PHP memory.

Fix Allowed Memory Size Error

You can increase PHP memory by using the php.ini file from the public_html folder.

  • First login to CPanel.
  • Now open File Manager.

File Manager CPanel

  • After opening the public_html folder you can find here php.ini. But if you don’t have then create a file like shown below having the name of “php.ini”.

Create New File in File Manager

  • If you have the below code in your php.ini file then good. Otherwise, paste the below code in the file.
max_execution_time = 30
max_input_time = 60
memory_limit = 128M
  • You can increase memory_limit to 256M but if it’s already set to 256M then increase it to 512M.
  • Now hit save changes.

If you want to get a result from your memory then create a php.ini recursive file. If you don’t have an idea then move to the tutorial: Create php.ini File Recursive

Lastly, visit your website where you were getting error allowed memory size exhausted error. Now no more seen the error “Allowed memory size”. But if you are getting this error still then that’s the error of software.

Supporting Articles

How To Check My Website Server IP Address?

How To Verify mod rewrite Enabled Or Not On Server?

IP Canonicalization Test And Fix Method With Pictures

Show More

Muhammad Awais Azeem

"Global Blurb since 2015" M. Awais Azeem is the CEO and founder of Global Blurb. The blog designed to share ideas about different topics. My profession is Accountant and I have completed CA Inter from Institute of Chartered Accountants of Pakistan. Me and my time present to sort out any issue regarding SEO, Blogging, Content Marketing and WordPress. Hire Us and Goodbye difficulty.

Related Articles

Want to contribute