Sometime you may encounter a blank page, endless saving or get a PHP Fatal error regarding the Allowed memory size of xxxxxxx bytes exhausted. This is one of the most common WordPress errors and it’s easily fixable by increasing the PHP memory limits.
The best solution for this error is to ask your hosting provider for help. In case you want to try to fix this error on your own, you can follow one of the solutions below.
Raise the WordPress memory limit by editing wp-config.php file
- Open wp-config.php, by default, located in the WordPress site’s root directory. You can use FTP or File Manager on your hosting to access the file.
- Find the line at the end of the file that says: That’s all, stop editing! Happy blogging.
- Add following code:
This code tells WordPress to increase the PHP memory limit to 256MB.
WordPress memory limit can be different from the limit on the server side – you need to set WordPress memory limit regardless of server memory settings.
Raise the Server memory limit by editing php.ini file
If you have access to the php.ini file, find the line of code where the memory limit is allocated and raise the value, let’s say to 256MB. It will look like this:
memory_limit = 256M;
Alternatively, in case you do not have access to php.ini file, you may try to increase memory limit by editing .htaccess file by adding the following code:
php_value memory_limit 256M