Increasing allocated memory in WordPress
- by linda Y
- in wordpress
- View 207
Web servers are just like any other computer. They need memory to efficiently run multiple applications at the same time. Server administrators allocate specific memory size to different applications including PHP.
When the allowed memory size of an allocated amount of bytes is exhausted it means the PHP script responsible for running a process or function has been exceeded.
This can occur when poorly optimized scripts or too many resources (like plugins) attempt to allocate too much or all of the memory available on a server.
How to Fix WordPress Fatal Error "Allowed memory size of bytes exhausted"
Try adding this line to your wp-config.php file:
If you have access to your PHP.ini file, change the line in PHP.ini
If your line shows 32M try 128M:
memory_limit = 128M ;
If you don't have access to PHP.ini try adding this to a .htaccess file:
php_value memory_limit 128M
Talk to your host.
If you have just updated a plugin and you're seeing errors, try rolling back to a previous version.
In most cases, if you get a memory limit error it's due to a faulty plugin. If you set it to 128 M and still getting the error, then you for sure know it's due to a faulty plugin. So the key question is what plugin did you install prior to this and uninstall it.
Plugin for Keeping Track of Memory Usage
Use the TPC! Memory Usage plugin to track the memory usage in your WordPress.
TPC! Memory Usage allows WordPress administrators to view the current and peak memory usage of the application. This is extremely helpful when testing new plugins, or if there are a lot of modifications, plugins, or large language files.