Sunday, June 16, 2024
No menu items!
Google search engine
HomeHow toHow to Fix the WordPress Memory Exhausted Error - Increase PHP Memory

How to Fix the WordPress Memory Exhausted Error – Increase PHP Memory

Through plugins and themes, the well-known content management system WordPress enables versatility and personalization. But when you make your website more functional, you can run across issues like “WordPress Memory Exhausted.” This error happens when the PHP memory limit for your website is reached. The PHP memory can be increased, which is a solution. In this tutorial, we’ll walk you through the process of boosting PHP memory to fix the “WordPress Memory Exhausted” error.

Step 1: Identifying the Error:

When your website runs out of PHP memory, you might see an error message like “Fatal error: Allowed memory size exhausted.” This error could appear on your site or in the WordPress admin area. It’s essential to identify this error before proceeding with the fix.

Step 2: Locating the WordPress Files:

You’ll need to edit your WordPress files, so access your site’s files either through an FTP client or your hosting’s file manager.

Step 3: Finding the wp-config.php File:

Inside your WordPress root directory, find the “wp-config.php” file. This file holds crucial configuration settings for your WordPress site.

Step 4: Backing Up:

Before making any changes, create a backup of your “wp-config.php” file. This ensures you can revert to the original state if anything goes wrong.

Step 5: Editing wp-config.php:

Open the “wp-config.php” file using a text editor, and add the following line just before the line that says “That’s all, stop editing! Happy blogging.”

define('WP_MEMORY_LIMIT', '256M');


This code increases your PHP memory limit to 256 megabytes, but you can adjust the value according to your needs.

Step 6: Saving Changes:

Save the edited “wp-config.php” file.

Step 7: Testing:

Refresh your website and check if the “WordPress Memory Exhausted” error is resolved. If it persists, proceed to the next step.

Step 8: Editing .htaccess File:

If the error persists, access your root directory again and locate the “.htaccess” file. Add the following code at the bottom of the file:

php_value memory_limit 256M

Again, adjust the memory limit value as needed.

Step 9: Testing Again:

Refresh your site once more to see if the error is resolved.

Step 10: Contact Hosting Support:

If the error persists despite these steps, it might be due to limitations set by your hosting provider. Contact their support for assistance. They might be able to adjust the PHP memory limit for you.


- Advertisment -
Google search engine

Most Popular

Recent Comments