Close Menu
  • Home
  • Servers
  • Hosting Tutorials
    • cPanel&WHM
  • WordPress Tutorial
    • WordPress General
    • WooCommerce
    • Useful Plugin

Subscribe to Updates

Get the latest creative news from FooBar about art, design and business.

What's Hot

Important WP 6.2 Issue — Read Before Updating

April 5, 2023

WordPress Two-Factor Authentication (2FA): what is it & using it on your site

January 26, 2023

The biggest source of WordPress vulnerabilities

January 26, 2023
Facebook X (Twitter) Instagram
  • Home
  • Servers
    Featured
    Servers

    What Is Imunify360? How Does It Enhance Website Security?

    By The GeekJanuary 2, 20230
    Recent

    What Is Imunify360? How Does It Enhance Website Security?

    January 2, 2023

    How to set up a Raspberry Pi ownCloud server in 7 steps

    December 20, 2022

    How To Install Linux, Nginx, MySQL, PHP (LEMP) stack On CentOS 7

    December 20, 2022
  • Hosting Tutorials
    1. cPanel&WHM
    Featured
    Hosting Tutorials

    What is Let’s Encrypt SSL certificate

    By The GeekDecember 26, 20220
    Recent

    What is Let’s Encrypt SSL certificate

    December 26, 2022

    What Is Web Hosting? What Is Shared Hosting?

    December 26, 2022

    How to install cPanel on CentOS 7

    December 22, 2022
  • WordPress Tutorial
    1. WordPress General
    2. WooCommerce
    3. Useful Plugin
    Featured
    General

    Important WP 6.2 Issue — Read Before Updating

    By The GeekApril 5, 20230
    Recent

    Important WP 6.2 Issue — Read Before Updating

    April 5, 2023

    WordPress Two-Factor Authentication (2FA): what is it & using it on your site

    January 26, 2023

    The biggest source of WordPress vulnerabilities

    January 26, 2023
Facebook Instagram
Horizen.ro – Tech Blog & Server environmentHorizen.ro – Tech Blog & Server environment
Subscribe
  • Home
  • Servers
    Featured
    Servers

    What Is Imunify360? How Does It Enhance Website Security?

    By The GeekJanuary 2, 20230
    Recent

    What Is Imunify360? How Does It Enhance Website Security?

    January 2, 2023

    How to set up a Raspberry Pi ownCloud server in 7 steps

    December 20, 2022

    How To Install Linux, Nginx, MySQL, PHP (LEMP) stack On CentOS 7

    December 20, 2022
  • Hosting Tutorials
    1. cPanel&WHM
    Featured
    Hosting Tutorials

    What is Let’s Encrypt SSL certificate

    By The GeekDecember 26, 20220
    Recent

    What is Let’s Encrypt SSL certificate

    December 26, 2022

    What Is Web Hosting? What Is Shared Hosting?

    December 26, 2022

    How to install cPanel on CentOS 7

    December 22, 2022
  • WordPress Tutorial
    1. WordPress General
    2. WooCommerce
    3. Useful Plugin
    Featured
    General

    Important WP 6.2 Issue — Read Before Updating

    By The GeekApril 5, 20230
    Recent

    Important WP 6.2 Issue — Read Before Updating

    April 5, 2023

    WordPress Two-Factor Authentication (2FA): what is it & using it on your site

    January 26, 2023

    The biggest source of WordPress vulnerabilities

    January 26, 2023
Horizen.ro – Tech Blog & Server environmentHorizen.ro – Tech Blog & Server environment
Home»General»Important WP 6.2 Issue — Read Before Updating
General

Important WP 6.2 Issue — Read Before Updating

The GeekBy The GeekApril 5, 2023Updated:April 5, 2023No Comments6 Mins Read
Facebook Twitter Pinterest LinkedIn Tumblr Email
Share
Facebook Twitter LinkedIn Pinterest Email

The popular and widely used content management system WordPress received a major update to version 6.2 this week. And as with any major WordPress update, there have been quite a few issues. Well, to be precise, not with everyone. What I generally noticed is that the most problems occurred with memory exhaustion on shared hosting, where php.ini cannot be modified. So what to do after updating to WordPress 6.2 and a fatal error: allowed memory size?

  • WordPress 6.2 and a fatal error: allowed memory size. What actually happened?
  • To address this error, the first thing you should do is to check the WordPress revisions.
  • How to fix the fatal error: allowed memory size?
  • How to fix this error on a shared hosting where increasing the memory limit is not possible?
  • WordPress 6.2 and fatal error: allowed memory size. How to prevent it?
  • Conclusion

WordPress 6.2 and a fatal error: allowed memory size. What actually happened?

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

Simply put, every hosting has a certain amount of memory allocated to it, called the memory limit. Each plugin, WordPress itself, and the theme takes a portion of this memory. However, after updating to WordPress 6.2, many people exhausted this memory due to incompatibility with the new version of WordPress and other content. As a result, WordPress can no longer function and ends up with a fatal error.

To address this error, the first thing you should do is to check the WordPress revisions.

WordPress revisions serve as the first point of focus. You can learn more about WordPress revisions and their usage here: What is revision in WordPress?  It’s possible that your WordPress site already has a large number of revisions, which could be the reason why the new version of the system crashed. If you don’t periodically delete revisions, their number increases significantly and can eventually lead to memory problems. Therefore, it’s likely that revisions are the cause of the memory problem that occurred after upgrading to version 6.2.

If you don’t have access to administration, you can delete revisions directly in the database using the PhpMyAdmin tool. You’ll need to execute this command:

DELETE FROM wp_posts WHERE post_type = "revision";

How to fix the fatal error: allowed memory size?

There are two possible ways to fix this problem, depending on whether you can increase memory or not. In general, this can only be done on your own server, where you have access to the php.ini file. On shared hosting, memory is typically set and cannot be changed. If you have the option, increasing memory can be a solution to the problem. It’s only a partial solution, but it will solve the problem. However, it won’t address the underlying cause.

You can increase the memory limit by editing the php.ini file or the .htaccess file (if allowed). In php.ini, you can do this by increasing the value in the file, for example from 256 to 512.

If allowed on the server, you can increase the memory limit in the .htaccess file by adding the following directive:

php_value memory_limit 512M

I must note that increasing the memory limit through the .htaccess file must be allowed. It may be a directive that is disabled and can cause problems.

When is it possible to use the .htaccess file to increase the memory limit?To set a memory limit for PHP scripts using the .htaccess file, it’s possible to use a specific directive. However, to enable the memory limit configuration through .htaccess, the server must have the directive ‘AllowOverride Options’ or ‘AllowOverride All’ enabled for the directory where the .htaccess file is located.

How to fix this error on a shared hosting where increasing the memory limit is not possible?

On shared hosting, you usually don’t have the option to increase the memory limit. So what can you do here? To be honest, not much. The only solution is to restore WordPress from a backup (FTP and MySQL) and disable automatic updates. If you don’t disable the updates, WordPress will perform the update to version 6.2 again within a few minutes and you’ll end up with the same error. Disabling updates is done through the wp-config.php file, which you can access via FTP. It’s located in the root directory of WordPress and is the configuration file. Insert this line into it:”

define( 'WP_AUTO_UPDATE_CORE', false );

If you would like to disable and theme updates as well, add these lines:

add_filter( 'auto_update_plugin', '__return_false' );
add_filter( 'auto_update_theme', '__return_false' );

WordPress 6.2 and fatal error: allowed memory size. How to prevent it?

Here are a few points to keep in mind:

  • Be mindful of the plugins you install and don’t try to solve every problem with a new plugin.
  • Always check the date of the last plugin update. If a plugin hasn’t been updated in a long time, it may cause problems in the new version.
  • Pay attention to themes and choose ones with a wide user base and active developer communication.
  • Regularly back up your website and database.

If you do encounter such an error on your website and are forced to restore it from a backup, it’s good to identify where the problem originated. First, try changing the theme temporarily. It’s best to use a WordPress default theme to rule out the possibility of a memory issue with an unsupported theme.

If the problem isn’t with the theme, you’ll need to investigate the plugins. So, focus on the plugins you’re using and the version of WordPress they are tested with. Additionally, check when the developer last updated them. Replace outdated plugins with alternatives that the developer maintains.

Conclusion

As you can see from the above, it’s often possible to prevent the problem by installing plugins that are prepared for the new version. The same goes for themes. A plugin that hasn’t been tested on the latest version you’re using will likely have an issue, and the developer may not respond or may not be responsive enough. With verified plugins and themes, where the developer tests on a beta version of the new WordPress, you have at least the basic certainty that problems will be eliminated when the new WordPress version is released. The problem may not even arise.

featured
Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
The Geek
  • Website

Related Posts

WordPress Two-Factor Authentication (2FA): what is it & using it on your site

January 26, 2023

The biggest source of WordPress vulnerabilities

January 26, 2023

15 ways to secure your WordPress site

January 19, 2023
Add A Comment

Comments are closed.

Editors Picks

Important WP 6.2 Issue — Read Before Updating

April 5, 2023

WordPress Two-Factor Authentication (2FA): what is it & using it on your site

January 26, 2023

The biggest source of WordPress vulnerabilities

January 26, 2023

15 ways to secure your WordPress site

January 19, 2023
Top Reviews
Advertisement
Demo
Horizen.ro – Tech Blog & Server environment
Facebook X (Twitter) Instagram Pinterest Vimeo YouTube
  • Home
  • Hosting Tutorials
  • Cpanel & WHM
  • Cookie Policy (EU)
© 2025

Type above and press Enter to search. Press Esc to cancel.

Manage Cookie Consent
We use technologies like cookies to store and/or access device information. We do this to improve browsing experience and to show personalized ads. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Manage options Manage services Manage {vendor_count} vendors Read more about these purposes
View preferences
{title} {title} {title}