Fix: WordPress Memory Exhausted Error – Increase PHP Memory

If you use many plugins, WordPress may give you an error message that the “memory limit” has been reached. This happens when the code on your website uses more memory that is made available by default.

What causes the “Memory Limit” terror?

WordPress is made with PHP, a programming language. Your server must, therefore, be suitable for hosting PHP websites. Do not worry, your server is right. If your server was not suitable for this, your WordPress website would not work at all.

A server uses memory to run applications, and the administrator of your server (usually your hosting Provider ) can assign a memory limit to different applications. So it may happen that the “Memory Limit” is exceeded. That error looks something like this:

WordPress will automatically try to increase the limit to 64MB. However, this is not always enough. That is why it will sometimes be necessary to increase this limit yourself.

Increase the WordPress “Memory Limit”

There are several methods that you can try to increase the limit.

1: wp-config.php

Log in to your server via FTP and search for the wp-config.php file. You can find this file in the “root” of the directory where your WordPress website is located. Now add the code below to this file, just before the last line (” That’s all, stop editing! Happy blogging. “).

With this code, you increase the “memory limit” to 256MB. That is more than enough in most cases. Save the wp-config.php file again and check if your website is working again (and the error disappears).

2: php.ini

Log in via FTP and check if there is already a php.ini file in your / wp-admin / folder. If not, create a new file called php.ini and put in the following code:

3: .htaccess

If the methods mentioned above do not work, search via FTP for the .htaccess file and add the following code:

If this does not work

If adding the above code has not worked, it means that WordPress is unable to increase the limit itself. In that case, the setting of WordPress is probably “overruled” by a setting on your server. It is the time to contact your Hosting Provider. If your hosting Provider can not help you, then it’s time to switch to a better hosting Provider!

LEAVE A REPLY

Please enter your comment!
Please enter your name here