Allowed memory size exhausted error after wordpress 6.2 Upgrade

Recently one of the websites on our server has stopped working. when I was looking for a root cause on server logs the error i could see was,

Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 8192 bytes) in ...

So I tried increasing the memory on the server initially it was 1GB. Even after increasing it to 2GB all I could see was the same error. and server memory was full.

Then I tried to disable all plugins installed on this WordPress site. that didn’t help either.

When I was desperate for a solution I noticed that a new version of WordPress was released recently

So I downgraded the WordPress version to 6.1, and the website was back online.

How to downgrade the WordPress version

Downgrading WordPress can be a bit tricky, and it’s important to have a backup of your website before starting the process. Here are the steps to downgrade WordPress to a previous version:

  1. Backup your website: Make a full backup of your website, including your database and files.
  2. Download the old WordPress version: Go to the WordPress Release Archive and download the version you want to install. Make sure to download the .zip file.
  3. Deactivate all plugins: Deactivate all the plugins installed on your WordPress site. This will prevent any conflicts during the downgrade process.
  4. Delete the current WordPress files: Connect to your website using an FTP client, and delete all the WordPress files except the wp-config.php file and the wp-content folder.
  5. Upload the old WordPress files: Unzip the WordPress version you downloaded in step 2, and upload all the files to your website.
  6. Run the WordPress upgrade script: Visit your website’s URL, and add /wp-admin/upgrade.php to the end of the URL. For example, if your website’s URL is, the upgrade script URL would be This will run the upgrade script for the old version of WordPress you just installed.
  7. Reactivate plugins: Reactivate all the plugins that were deactivated in step 3.

That’s it! Your WordPress site should now be downgraded to the previous version. Keep in mind that downgrading WordPress can cause compatibility issues with your theme and plugins, so it’s important to test your site thoroughly after the downgrade. If you encounter any issues, restore your backup.

Let me know if you have any questions in the comments.