Fix: WordPress Memory Exhausted Error – Increase PHP Memory

First, you need to edit the wp-config.php file on your WordPress site. It is one of the core WordPress files located in your WordPress site’s root directory, usually named public_html.

You will need to use an FTP client like FileZilla or file manager in your web hosting control panel.

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

This code tells WordPress to increase the PHP memory limit to 256MB.

For more details, see our step-by-step guide on how to find and edit the wp-config.php file.

Once you are done, you need to save your changes and upload your wp-config.php file back to your server.

You can now visit your WordPress site, and the memory exhausted error should have disappeared.

Editing the .htaccess File

The next method is to edit the .htaccess file. This file is also located in the WordPress website’s root folder.

Here, you need to paste the following code before the line that says #END WORDPRESS.

php_value memory_limit 256M

Powered by BetterDocs

Leave a Reply

Your email address will not be published. Required fields are marked *