Fix: WordPress Memory Exhausted Error
The memory limit is a very known WordPress issue. It is caused mainly when you are loading a lot of data into memory, and that your hosting memory size is not sufficient to handle all of that data.
For the case of the Advanced Database Cleaner plugin, memory issues may arise when you have a lot of tables, options, etc. When the plugin is loading the corresponding pages, you will notice either a blank page or an error message with "There has been a critical error on your website". If you check your logs, you will find something like "PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 1310720 bytes) in /wp-includes/wp-db.php on line xxx"
To solve the WordPress memory exhausted error, you need to increase your PHP memory limit.
How to increase the PHP memory limit in WordPress?
To do this, you need to edit the wp-config.php file on your WordPress site. You can find this file in your WordPress site’s root folder. To make changes to this file, you will need an FTP client or edit it directly from your file manager under your hosting panel.
Once you open the file, search for this sentence ‘ That’s all, stop editing! Happy blogging’, then paste the following code just before that sentence:
define( 'WP_MEMORY_LIMIT', '256M');
Then save changes to the file. This should solve the issue of memory.
Note: If you still have the memory issue even after adding that code, this means that either your need to increase the size more or that your hosting provider is not allowing you to increase the memory using this technique. In this case, the only solution is to contact your hosting service provider and ask them to increase the memory size for you.