If you’ve encountered the WordPress memory exhausted error, you’re not alone. This common issue often appears as “Allowed memory size of xxx bytes exhausted,” preventing plugins or themes from functioning properly. Fortunately, there’s a simple way to fix this problem by increasing your PHP memory limit—even without access to cPanel or web hosting control panel. In this guide, we’ll show you how to increase PHP memory limit to fix WordPress memory exhausted error using just the WP File Manager plugin.
What is the WordPress Memory Exhausted Error?
WordPress is a PHP-based platform that relies on server resources to function efficiently. When your website exceeds the default PHP memory limit, WordPress throws a fatal error. This usually happens when you’re running resource-intensive themes, plugins, or scripts.
Common variations of the error message include:
-
Fatal error: Allowed memory size of x bytes exhausted
-
White screen of death (WSOD)
-
HTTP error during image upload
These problems occur when WordPress doesn’t have enough memory to complete a process. The default PHP memory limit is usually 32M or 64M, which is often insufficient for modern websites.
Why Increase the PHP Memory Limit?
Here are a few reasons why you may need to increase your WordPress PHP memory limit:
-
Large themes or plugins require more memory
-
Running WooCommerce or other eCommerce platforms
-
High-traffic websites with lots of content
-
To prevent 500 internal server errors
-
Faster website performance and fewer crashes
Now let’s get to the solution—increasing the PHP memory limit without hosting or cPanel access.
How to Increase PHP Memory Limit to Fix WordPress Memory Exhausted Error (Using WP File Manager Plugin)
If you don’t have access to your hosting control panel or cPanel, don’t worry. You can still fix the WordPress memory limit issue by using the WP File Manager plugin, which lets you access and edit files directly from your WordPress dashboard.
Step-by-Step Instructions:
Step 1: Install WP File Manager Plugin
-
Log in to your WordPress admin dashboard.
-
Go to Plugins > Add New.
-
Search for “WP File Manager”.
-
Click Install Now, then Activate the plugin.
Step 2: Locate the wp-config.php
File
-
Once the plugin is activated, go to WP File Manager from the dashboard.
-
Navigate to the public_html or root directory of your WordPress installation.
-
Look for a file named
wp-config.php
. This is the core configuration file for your WordPress site.
Step 3: Edit wp-config.php
File
-
Right-click on the
wp-config.php
file and choose Edit. -
Scroll down until you see the line:
-
Just above that line, paste the following code:
This code tells WordPress to increase the PHP memory limit to 1024MB, which is usually more than enough for any WordPress site.
-
Click Save to update the file.
Step 4: Verify the Fix
-
Clear your browser cache and refresh your site.
-
Try to recreate the action that triggered the memory error.
-
If everything is working fine, the issue is resolved!