WordPress fatal memory error after upgrading to version 6.2.

Last updated December 6th, 2023 00:32

After the release of the WordPress update to version 6.2, users across the internet are still reporting website crashes. Typically, these crashes result in a critical error message indicating a memory limit has been exceeded. Once this occurs, the website becomes completely non-functional, and it’s impossible to access the WordPress administration panel. Given the large number of users reporting this issue, it’s clear that there is a reason for this memory exhaustion. In this article, we’ll take a closer look at WordPress fatal memory error after upgrading to version 6.2.

WordPress fatal memory error after upgrading to version 6.2

Fatal error: allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes) in /web/htdocs/www.my-domain.com/home/www/wp-includes/plugin.php on line 203

The critical error in WordPress 6.2 is caused by the use of plugins and theme templates that are not compatible with the new version. Typically, these are older plugins and templates that their developers either haven’t updated or haven’t prepared for the transition to the new version. If you haven’t yet upgraded, I strongly recommend going through your plugin list and checking your template for compatibility with the latest version. Also, check when the plugins were last updated. If any of your plugins haven’t been updated for more than six months, they may cause the same problem (even if they’ll probably fall into the first issue automatically).

Why does memory exhaustion happen and why increasing the memory limit doesn’t help?

There are several reasons why memory exhaustion happens. These include new versions of WordPress libraries that lead to class conflicts, outdated functions used in plugins such as get_page_by_title() for searching, the Requests.php file and the class-requests.php class, and other things that require changes in the source code to make plugins and themes compatible. This is a classic problem of old solutions and new WordPress not working well together. If you want to learn more, you can check out this article (https://blogiestools.com/wordpress-6-2/).

Now, the reason why memory exhaustion happens is straightforward. A plugin or theme simply calls a function that, unfortunately, causes an endless loop with the new WordPress version. It keeps repeating indefinitely without being terminated, leading to memory exhaustion and error.

How to fix WordPress fatal memory error after upgrading to version 6.2?

Unfortunately, the first solution is to restore your website from a backup and temporarily suspend all updates. In the first step, you need to revert back to the previous WordPress version 6.1, which can be done relatively easily by restoring data on FTP and in MySQL database. If you do not have your own backup, I believe that your web hosting provider’s technical support can help you with the problem.

However, this is only the first step. Once you have reverted to the previous WordPress version, you will need to disable core updates, plugin updates, and theme updates. This is a temporary solution until you fix the problem by changing the plugin or theme for a different one, or until the developer of the problematic element updates the code. Staying on an old version of WordPress is a security risk, so do not consider this as a solution to the problem.

To disable updates, follow these steps:

  1. Log in to your FTP client.
  2. In the root directory of WordPress, find the wp-config.php file.
  3. Add the following lines to it:

Disable WordPress core updates

				
					define( 'WP_AUTO_UPDATE_CORE', false );
				
			

How to disable plugin updates

				
					add_filter( 'auto_update_plugin', '__return_false' );
				
			

Disable theme updates

				
					add_filter( 'auto_update_theme', '__return_false' );
				
			
WordPress fatal memory error after upgrading to version 6.2
Vyčerpání paměti u WordPressu po přechodu na verzi 6.2

WordPress fatal memory error after upgrading to version 6.2 – conclusion

As I mentioned earlier, this is only a temporary solution. It is not a solution to the problem. An un-updated WordPress is, was, and will always be a security problem. You have only two options. Identify which plugin or theme is causing the loop and replace it with its equivalent that is ready for the new version, or wait for the author to release a fix. Whatever you choose, it’s important to keep in mind that it’s a good idea to remove the above-mentioned codes over time and update the CMS along with all its plugins. Even if it means a complete redesign of your website.

More content about WordPress

Whole category is here

The website is created with care for the included information. I strive to provide high-quality and useful content that helps or inspires others. If you are satisfied with my work and would like to support me, you can do so through simple options.

Byl pro Vás tento článek užitečný?

Klikni na počet hvězd pro hlasování.

Průměrné hodnocení. 0 / 5. Počet hlasování: 0

Zatím nehodnoceno! Buďte první

Jak užitečný vidíte tento článek.

Sledujte mě na sociálních médiích.

Je mi líto, že pro Vás nebyl článek užitečný.

Jak mohu vylepšit článek?

Řekněte mi, jak jej mohu zlepšit.

newsletter

Subscribe to the Newsletter

Stay informed! Join our newsletter subscription and be the first to receive the latest information directly to your email inbox. Follow updates, exclusive events, and inspiring content, all delivered straight to your email.

Odebírat
Upozornit na
guest
3 Komentáře/ů
Nejstarší
Nejnovější Nejvíce hlasováno
Vložené zpětné vazby.
Zobrazit všechny komentáře.
Ezekiel Williams

Thank you very much for this article. I have reverted to the original version of WordPress 6.1 and disabled updates. So far, everything seems to be working. I will search for the plugin causing the issue and as for updates, we’ll see. For now, I’ll probably postpone them.
Best regards,
Ezekiel Williams

Colby Hackett

Thank you for the article, in the end, it helped to revert back to WordPress version 6.1 from the backup.

Pokud mi chcete napsat rychlou zprávu, využije, prosím, níže uvedený
kontaktní formulář. Děkuji.

Další Kontaktní údaje