Get WordPress fix assistance through ticket portal or email us at email@example.com
Fix the WordPress Memory Exhausted Error
How to Fix the WordPress Memory Exhausted Error: Increase PHP Memory
The WordPress Memory Exhausted Error is a common issue that many WordPress users may encounter. This error occurs when the PHP memory limit set on your server is not sufficient to handle the demands of your website. The error message typically states that “
Fatal error: Allowed memory size of xxxxxxx bytes exhausted (tried to allocate xxxxx bytes)” and can be caused by a variety of reasons such as large image files, plugins, or themes.
Fortunately, this error can be easily fixed by increasing the PHP memory limit on your server. In this blog post, we will guide you through the process of increasing your PHP memory limit and resolving the “memory exhausted” error on your WordPress website, by editing the code in the wp-config.php file.
Step 1: Locate the wp-config.php File
The first step in increasing your PHP memory limit is to locate the wp-config.php file on your server. This file controls various settings for WordPress, including the memory limit. The location of this file is in the root folder of your WordPress installation.
Step 2: Increase the PHP Memory Limit
Once you have located the wp-config.php file, you can increase the memory limit by editing the file. You can use a text editor such as Notepad or Sublime Text to open the file.
Add the following line of code at the bottom of the file:
define( 'WP_MEMORY_LIMIT', '256M' );
This will increase the memory limit to 256MB. You can adjust the value to a higher or lower number depending on your needs.
Step 3: Save and Upload the wp-config.php File
After you have increased the memory limit, save the changes to the wp-config.php file and upload it back to your server. Make sure to upload the file to the same location where you found the original file.
Step 4: Check if the Error is Resolved
After you have increased the PHP memory limit and uploaded the wp-config.php file, you should check if the “memory exhausted” error is resolved.
To do this, simply visit your website and see if the error message is still displayed. If the error message is gone, then you have successfully increased your PHP memory limit and resolved the “memory exhausted” error.
The WordPress Memory Exhausted Error is a common issue that can be easily fixed by increasing the PHP memory limit on your server. By following the steps outlined in this blog post, you can resolve this issue in minutes.
It is important to note that increasing the PHP memory limit is not a permanent solution to the “memory exhausted” error. If you continue to encounter this error after increasing the memory limit, it may be a sign of a larger issue, such as a memory leak caused by a plugin or theme.
In such cases, it is recommended to investigate the cause of the error and take appropriate actions, such as disabling or replacing problematic plugins or themes. Additionally, it can be helpful to regularly monitor your website’s memory usage and optimize the size of images and other media files.
If you are still facing issues after following the above steps, it is a good idea to reach out to a professional for further assistance. WP Genius offers help with this issue by creating a ticket for free.
In conclusion, by following the steps outlined in this blog post, you will be able to increase your PHP memory limit and fix the “memory exhausted” error on your WordPress website. With a little bit of troubleshooting and optimization, you can keep your website running smoothly and avoid this error in the future.