How to Fix This WordPress Memory Limit Error?
If you stumble upon an “Allowed memory size of bytes exhausted” PHP error, it’s likely that your site has consumed all its allocated memory. At this point, you’re probably unsure what exactly could be causing the issue. Therefore, you should first try increasing the WordPress memory limit. There are several ways to do this, depending on your site’s hosting environment.
Method 1: Increase PHP Memory Limit
Using MultiPHP INI Editor
Step 1: Login to cPanel

Step 2: Go to Software ➝ MultiPHP INI Editor

Step 3: Select the location where you would like to configure PHP settings

Step 4: Under the PHP Directive section look for memory_limit. By default the memory_limit would be configured to 512 MB.

Step 5: Type in the value that you would like in the textbox provided and click on Apply

You have successfully increased your PHP memory limit.
Edit the wp-config.php
Step 1: Login to cPanel

Step 2: Go to Files ➝ File Manager

Step 3: Click on the public_html directory on the left sidebar

Step 4: Look for a file named as wp-config.php

Step 5: Right-click on the wp-config.php file to Edit it, paste the following code snippet inside, and Save the changes. Make sure you paste it right above the line.
define( 'WP_MEMORY_LIMIT', '700M' );


If you see the line “define( ‘WP_MEMORY_LIMIT’, ‘512M’ );”, simply edit the value to 700M.
Check your php.ini file
Step 1: Login to cPanel

Step 2: Go to Files ➝ File Manager

Step 3: Go to public_html on the left sidebar

Step 4: Look for a file named as php.ini

Step 5: Right-click on the file and click on Edit

Step 6: Look for the line defining the memory_limit variable and set the value accordingly.

memory_limit = 800M
Then, save the changes and reload your site to see if the PHP “Allowed Memory Size of Bytes Exhausted” error has been resolved.
Method 4: Disable all plugins
If you have increased the memory limit, but your site is still showing the “allowed memory size of bytes exhausted” PHP error – try disabling plugins. Most likely, a plugin on your site has exceeded the memory limit, causing a memory leak. Due to that faulty plugin, the browser shows the “Allowed memory size exhausted” error, preventing access to your website.
Therefore, by disabling your WordPress plugins, you should be able to access your site and start enabling them one by one to find the culprit.
Step 1: Login to Cpanel

Step 2: Go to Files ➝ File Manager

Step 3: Now go to public_html on the left sidebar

Step 4: Under the public_html directory go to wp-content

Step 5: Now right click on the plugins and rename it to anything you want to . For example: plug_ins



By renaming the plugins folder , you have successfully disabled all plugins in your wordpress site. Now check whether the error still persists. If the error still persists, contact your wordpress hosting provider