php - How to Solve 'Uncaught Error: Class “WP_Block_Metadata_Registry”' in WordPress site - Stack Overflow

Fatal error: Uncaught Error: Class "WP_Block_Metadata_Registry" not found in H:roothomeher

Fatal error: Uncaught Error: Class "WP_Block_Metadata_Registry" not found in H:\root\home\heritageenergy-002\www\fce\wp-includes\blocks.php:391 
Stack trace: 
#0 H:\root\home\heritageenergy-002\www\fce\wp-includes\blocks\index.php(174): wp_register_block_metadata_collection() 
#1 H:\root\home\heritageenergy-002\www\fce\wp-includes\class-wp-hook.php(324): wp_register_core_block_metadata_collection() 
#2 H:\root\home\heritageenergy-002\www\fce\wp-includes\class-wp-hook.php(348): WP_Hook->apply_filters() 
#3 H:\root\home\heritageenergy-002\www\fce\wp-includes\plugin.php(517): WP_Hook->do_action() 
#4 H:\root\home\heritageenergy-002\www\fce\wp-settings.php(700): do_action() 
#5 H:\root\home\heritageenergy-002\www\fce\wp-config.php(106): require_once('H:\\root\\home\\he...') 
#6 H:\root\home\heritageenergy-002\www\fce\wp-load.php(50): require_once('H:\\root\\home\\he...') 
#7 H:\root\home\heritageenergy-002\www\fce\wp-login.php(12): require('H:\\root\\home\\he...') 
#8 {main} thrown in H:\root\home\heritageenergy-002\www\fce\wp-includes\blocks.php on line 391

What I did to try to solve the problem:

  1. Rename both plugins and themes folders and tested
  2. Remove 'wp-includes' and 'wp-admin' folders and replaced with fresh downloads from WordPress.
  3. upgraded PHP Version to 8.1.

But none of the above solution could solve the problem.

Update: I manage to solve the problem by reinstalling a fresh copy of WordPress in the hosting server.

Fatal error: Uncaught Error: Class "WP_Block_Metadata_Registry" not found in H:\root\home\heritageenergy-002\www\fce\wp-includes\blocks.php:391 
Stack trace: 
#0 H:\root\home\heritageenergy-002\www\fce\wp-includes\blocks\index.php(174): wp_register_block_metadata_collection() 
#1 H:\root\home\heritageenergy-002\www\fce\wp-includes\class-wp-hook.php(324): wp_register_core_block_metadata_collection() 
#2 H:\root\home\heritageenergy-002\www\fce\wp-includes\class-wp-hook.php(348): WP_Hook->apply_filters() 
#3 H:\root\home\heritageenergy-002\www\fce\wp-includes\plugin.php(517): WP_Hook->do_action() 
#4 H:\root\home\heritageenergy-002\www\fce\wp-settings.php(700): do_action() 
#5 H:\root\home\heritageenergy-002\www\fce\wp-config.php(106): require_once('H:\\root\\home\\he...') 
#6 H:\root\home\heritageenergy-002\www\fce\wp-load.php(50): require_once('H:\\root\\home\\he...') 
#7 H:\root\home\heritageenergy-002\www\fce\wp-login.php(12): require('H:\\root\\home\\he...') 
#8 {main} thrown in H:\root\home\heritageenergy-002\www\fce\wp-includes\blocks.php on line 391

What I did to try to solve the problem:

  1. Rename both plugins and themes folders and tested
  2. Remove 'wp-includes' and 'wp-admin' folders and replaced with fresh downloads from WordPress.
  3. upgraded PHP Version to 8.1.

But none of the above solution could solve the problem.

Update: I manage to solve the problem by reinstalling a fresh copy of WordPress in the hosting server.

Share Improve this question edited Dec 27, 2024 at 9:57 Sandet asked Nov 18, 2024 at 18:40 SandetSandet 274 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 3

I got this solution from a site

I’d same challenge. Adding the following solved to wp-settings.php line 353 solved it.

require ABSPATH . WPINC . ‘/class-wp-block-metadata-registry.php’;

I had the same error, in my case between a Friday and it was working perfectly, in the afternoon I touched a couple of plugins and the following Tuesday it no longer worked. I have tried to delete the plugins that I touched from the terminal. It hasn't worked for me but maybe it will for you. In the end I reinstalled wordpress and started from scratch Feedback

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745601251a4635414.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信