"Fatal error: Allowed memory size of XXX bytes exhausted" error message after click 'Activate'

“Fatal error: Allowed memory size of XXX bytes exhausted” error message after click ‘Activate’ Zele theme. Worpress collapses.

Change the memory limit on the server

Hi @harsesis32,

Add the following code into wp-config.php, hope will fix your issues:

define(‘WP_MEMORY_LIMIT’, ‘256M’);

Thanks

Place this in your wp-config.php file

define(‘WP_MEMORY_LIMIT’, ‘256M’);

I use XAMPP on a local machine. I have set:

  • php.ini → memory_limit=256M
  • wp-config.php → define( ‘WP_MEMORY_LIMIT’, ‘256M’ );
  • .htaccess → php_value memory_limit 256M
    the error message is still:

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 4096 bytes) in C:\PHP_programs\WP_Fireball_2023\wp-includes\class-wp-dependencies.php on line 260

It is not possible to enter the wordpress interface.

268435456+4096 is more than 256 MB. Try increasing it to 512 and make sure to restart apache afterwards.

I try 512M:

Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 12288 bytes) in C:\PHP_programs\WP_Fireball_2023\wp-includes\class-wp-scripts.php on line 523

Add the following code into wp-config.php, hope will fix your issues:

define( 'WP_MAX_MEMORY_LIMIT', '512M' );

Thanks

Yes, that is in fact 512 MiB, so your configuration is working. The next step will obviously be to increase it even further, to 768 MB or even 1024 MB.

If you receive the same error after bumping the limit up to 1024, then that’s a pretty solid sign that the theme has an infinite loop somewhere. This will ultimately be an issue with the code, but it could stem from something specific to your installation (like corruption in the database or a malformed setting).

For the record, this is not a normal amount of memory for WordPress to require, and you almost certainly have a serious problem on your hands. I’d recommend reaching out to the theme’s author. I’m only advising these things as you’re working on localhost. This amount of memory will instantly crash a web server. 256 MB is the typical memory limit even on premium servers.

1 Like

Thanks, I tried 1024M, the error message:

Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 262144 bytes) in C:\PHP_programs\WP_Fireball_2023\wp-includes\class-wp-hook.php on line 308

I don’t know what the problem could be. That template is unusable for me, I will ask for its price back and look for another usable template.

You will likely be expected to contact the author of the theme for support before asking for a refund. But yes, since you’re seeing the same issue at 1024 MiB, it’s an issue with the code rather than your memory limit.

Try on a server. It’s probably localhost configuration issue.

I try on my server. After installation, the template cannot be activated on the server either. It produces the following error. No matter what memory limit I set.

[06-Apr-2023 13:44:42 UTC] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 262144 bytes) in /home/firebal2/public_html/wp-includes/class-wp-hook.php on line 308

I want a working template or I want the full amount paid back!

Are you sure you’re using the latest version of the theme? The author shipped a new update around the same time that you posted this thread, which claims to fix compatibility issues with the latest version of WordPress. That could very well be your issue.

Otherwise, as I mentioned above, please contact the theme’s author @BoldThemes via their support website http://boldthemes.ticksy.com/?envato_item_id=33188155 for a resolution.

Hi,

@baileyherbert thanks for the mention and heads up :slight_smile:
Indeed, @harsesis32, it seems like your theme version is not compatible with the current WordPress version (most likely 6.2).

Please update the theme to the latest version – 1.1.3 https://documentation.bold-themes.com/changelog/zele-changelog.txt

Please make sure to update the Zele plugin and Bold Builder plugin as well once you update the theme.

You can update the theme using the Envato Market plugin – Envato Market WordPress Plugin or manually as described in the theme documentation: 3. Theme Customization – Zele Theme , section 3.11 Update theme

1 Like

Thank you, the memory overflow was resolved by downloading the latest version. Unfortunately, I have another problem: google maps javascript shows an error and does not load. There are no error messages in the console. The API key and gps coordinates are given. I need some help. Thanks!

Check the Google Map configuration ( documentation )
I’m sure that you’re missing some configuration/set-up

It’s solved already.

Thanks, I checked everything, still not good. The documentation is very concise.

For google set-up/configuration, it’s time consuming job that someone needs to login with your credentials to check the configuration first then find/fix the problem. At this point, I don’t think anyone would be offering a free service for the set-up/configuration but if you’re in need to hire someone, I can offer paid job/work for it

Otherwise, this is a third-party issue, the theme/plugin support does not cover the free solutions, you need to find a way to fix it on your own. You can still contact Google Support but I’m pretty sure they will point their documentation instead