I was updating my site to WordPress to 6.2, but the installation never reached the end. When I refreshed the page I had the message: "There has been a critical error on this website".

I've turned debugging on and I could see there were two errors:

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 4096 bytes) in /home/qualalba/public_html/wp-content/plugins/wordpress-https/lib/Mvied/Url.php on line 245

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 4096 bytes) in /home/qualalba/public_html/wp-includes/class-wp-recovery-mode.php on line 178

(but the files associated with the errors keep changing if I try to open the site in another browser)

I've tried to disable all plugins by renaming the plugins folder to something else, and then I get only one error.

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 262144 bytes) in /home/qualalba/public_html/wp-includes/class-wp-hook.php on line 308

And this time the error is always the same in all browsers.

I tried several ways to increase the PHP memory limit, with no result:

  • in the WP-CONFIG.php: define("WP_MEMORY_LIMIT", 512)
  • in the .htaccess file: php_value memory_limit 512M
  • increasing the value via the cpanel.

No matter what the value is, the error persists. The error message shows me that the memory did increase, but it's never enough.

I also tried to copy manually a fresh 6.2 wordpress copy to my site, overwriting the old files (no result)

I really don't know what else I can do. Can it be a corruption in the database during the failed update process?

  • I don't suppose you've got backups to roll back to? I'd guess there's something bad in the database yes. Backup if you haven't already, and maybe clear the autoload value from any large values in wp_options. You could also try downloading a copy of the database and running a local install of WordPress on something where you can more easily control the memory, to see if you get any better errors.
    – Rup
    Commented May 2, 2023 at 20:02
  • 1
    Hi, Rup, thanks for the suggestion! I ended up doing that, and the site is now working fine. Good that I had the backup! I still haven't tried to update again to wordpress 6.2. I'm checking the instalation and removing unnecessary plugins. I'll try to update again once I've got that finished.
    – José Dias
    Commented May 4, 2023 at 18:45

2 Answers 2


No mention of the PHP version you have, but perhaps you are using an older PHP version ? Try running PHP 7.2 for a test. Upgrade to 8.x after the site stabilizes.

You can also try renaming the plugins and/or the themes folder to bypass those settings (which will affect the site, of course). Get things running 'bare-bones', then add your plugins/themes. You might try installing plugins/themes with the old ones renamed, in case older versions were causing problems.

Make sure you keep the site updated - WP core, themes, and plugins - at all times. That will reduce issues in many cases.

  • Thanks, Rick. I was running PHP 7.5. I am now cleaning up the site, removing unnecessary plugins and will try to update to 6.2 again soon.
    – José Dias
    Commented May 4, 2023 at 18:47

I resolved the issue.

For me it was a compatibility issue with my theme. I commented out the filters using "wp_video_shortcode_library" and "wp_audio_shortcode_library" in my theme. I updated WordPress to version 6.2 without updating the theme.

The theme I used is "Nifty - Business Consulting by BoldThemes".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.