Fix: Call to undefined function get allowed block template part areas()

After updating to WordPress version 5.9, you may get a blank white page or a fatal error saying something like:

[26-Jan-2022 15:52:28 UTC] PHP Fatal error: Uncaught Error: Call to undefined function get_allowed_block_template_part_areas() in /home/web/public_html/new/wp-includes/blocks/template-part.php:168

If you only get a white page without seeing anything, you can verify this error by activating the WordPress debug.log.

When this error happens, it means the WordPress automatically went wrong and broke your WordPress installation.

To fix that error, follow the steps below:

  • Download WordPress 5.9 core
  • Extra the zip file
  • Upload only the folders “wp-admin” and “wp-include” via FTP to your website. Overwrite the existing files from that folder.
The next time you update WordPress you can use a website and backup cloning tool like WP STAGING to create a clone of your site and to test updates first on the cloned site before you do it on your production site.