You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

求助:解决WordPress站点中‘Uncaught Error: Class “WP_Block_Metadata_Registry”’错误

求助:解决WordPress站点中‘Uncaught Error: Class “WP_Block_Metadata_Registry”’错误

我最近在访问WordPress站点登录页时碰到了一个致命错误,具体报错内容如下:

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

为了修复这个问题,我试了好几种办法,但都没奏效:

  • 重命名插件和主题文件夹,排查是否是第三方插件/主题引发的冲突
  • 删除wp-includes和wp-admin文件夹,替换成从WordPress官方下载的全新版本文件
  • 将PHP版本升级到8.1

可惜以上操作都没能解决这个错误。


更新:问题已解决

我最终通过在服务器上重新安装一份全新的WordPress副本,成功解决了这个问题。

备注:内容来源于stack exchange,提问作者Sandet

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.15 10:24:34