After the WordPress system disk is redeployed (PHP 7.4 upgrade to PHP 8.1), prompt: This site encountered a fatal error.
1. Reference:In Alibaba Cloud ECS, CentOS 7 migration (replace) to Alibaba Cloud Linux 3 . After the WordPress system disk is redeployed, it prompts: This site encountered a fatal error. as shown in Figure 1
2. Learn more about troubleshooting WordPress. Enable developer-only: WordPress debug mode. Edit wp-config.php
/** * Developer-only: WordPress debugging mode. ; * Change this value to "true", and WordPress will display all the prompts for development. * It is strongly recommended that plug-in developers enable this function in the development environment. */ define(wp_debug, true);
3. Refresh the page again, report an error
deprecated: return type of HM\BackupWordPress\CleanUpIterator::Accept() should either be compared with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange]Attribute should be used to temporarily support the notice in /data/wwwroot/www.shuijingwanwq.com/wp-content/plugins/backupwordpress/classes/class-path.php on line 456
Fatal error: uncaught error: undefined constant "wp_cumulus_widget" in /data/wwwroot/www.shuijingwanwq.com/wp-content/plugins/wp-cumulus/wp-cumulus.php:375 Stack trace: #0 /data/wwwroot/www.shuijingwanwq.com/wp-includes/class-wp-hook.php(308): widget_init_wp_cumulus_widget() #1 /data/wwwroot/www.shuijingwanwq.com/wp-includes/class-wp-hook.php(332): wp_hook->apply_filters() #2 /data/wwwroot/www.shuijingwanwq.com/wp-includes/plugin.php(517): wp_hook->do_action() #3 /data/wwwroot/www.shuijingwanwq.com/wp-includes/widgets.php(1854): do_action() #4 /data/wwwroot/www.shuijingwanwq.com/wp-includes/class-wp-hook.php(308): wp_widgets_init() #5 /data/wwwroot/www.shuijingwanwq.com/wp-includes/class-wp-hook.php(332): wp_hook->apply_filters() #6 /data/wwwroot/www.shuijingwanwq.com/wp-includes/plugin.php(517): wp_hook->do_action() #7 /data/wwwroot/www.shuijingwanwq.com/wp-settings.php(623): do_action() #8 /data/wwwroot/www.shuijingwanwq.com/wp-config.php(87): require_once(...) #9 /data/wwwroot/www.shuijingwanwq.com/wp-load.php(50): require_once(...) #10 /data/wwwroot/www.shuijingwanwq.com/wp-blog-header.php(13): require_once(...) #11 /data/wwwroot/www.shuijingwanwq.com/index.php(17): require(...) #12 {main} throw in /data/wwwroot/www.shuijingwanwq.com/wp-content/plugins/wp-cumulus/wp-cumulus.php on line 375
4. If it is found that they are all errors of the plugin, I decided to find a way to disable the plug-in that reports the error. Due to the WordPress dashboard, you need to disable plugins in different ways. Reference:How to Disable WordPress Plugin (4 Ways).
5. Reference:How to Disable WordPress Plugin via phpMyAdmin . Its essence is to operate data in the database.
6. Back up the database first, and then operate the data. Open the table wp_options, as shown in Figure 2
7. In the Options table, look for the active_plugins entry in the option_name column. Execute the following query SQL. as shown in Figure 3
select * from `wp_options` where `option_name` =active_plugins
8. Copy the value of the column OPTION_VALUE in the query result record, and use the PHP online deserialization tool.
a:14:{i:0;s:53:"accelerated-mobile-pages/accelerated-moblie-pages.php";i:1;s:19:"AKIS met/akismet.php";i:2;s:35:"BackupWordPress/BackupWordPress.php";I:3;S:33:"classic-edi tor/classic-editor.php";i:4;s:36:"contact-form-7/wp-contact-form-7.php";i:5;s:45:"dis can-google-fonts/disable-google-fonts.php";i:6;s:72:"golang-brush-for-syntaxhighlight er-evolved/syntaxhighlighter-gobrush.php";i:7;s:25:"hueman-addons/ha-fire.php";i:8;s: 15:"light/light.php";i:9;s:33:"nimble-builder/nimble-builder.php";i:10;s:47:"reGeneRat e-thumbnails/regenerate-thumbnails.php";i:11;s:39:"syntaxhighlighter/syntaxhighlighte r.php";i:12;s:25:"wp-cumulus/wp-cumulus.php";i:13;s:27:"wp-pagenavi/wp-pagenavi.php";}
array
( (
[0]=> accelerated-mobile-pages/accelerated-moblie-pages.php
[1]=> akismet/akismet.php
[2]=> BackupWordPress/BackupWordPress.php
[3]=>classic-editor/classic-editor.php
[4]=> contact-form-7/wp-contact-form-7.php
[5]=> disable-google-fonts/disable-google-fonts.php
[6]=> golang-brush-for-syntaxhighlighter-evolved/syntaxhighlightter-gobrush.php
[7]=> hueman-addons/ha-fire.php
[8]=> light/light.php
[9]=> nimble-builder/nimble-builder.php
[10]=> regenerate-thumbnails/regenerate-thumbnails.php
[11]=> SyntaxHighlighter/SyntaxHighlighter.php
[12]=> wp-cumulus/wp-cumulus.php
[13]=> wp-pagenavi/wp-pagenavi.php
)
9. Remove the plugin in the result of deserialization: backupwordpress/backupwordpress.php, wp-cumulus/wp-cumulus.php, and then php The serialized result is stored in the value of the column Option_VALUE. The PHP code is implemented as follows
<?php
$a =a:14:{i:0;s:53:"accelerated-mobile-pages/accelerated-moblie-pages.php";i:1;s:19:"AKIS met/akismet.php";i:2;s:35:"BackupWordPress/BackupWordPress.php";I:3;S:33:"classic-edi tor/classic-editor.php";i:4;s:36:"contact-form-7/wp-contact-form-7.php";i:5;s:45:"dis can-google-fonts/disable-google-fonts.php";i:6;s:72:"golang-brush-for-syntaxhighlight er-evolved/syntaxhighlighter-gobrush.php";i:7;s:25:"hueman-addons/ha-fire.php";i:8;s: 15:"light/light.php";i:9;s:33:"nimble-builder/nimble-builder.php";i:10;s:47:"reGeneRat e-thumbnails/regenerate-thumbnails.php";i:11;s:39:"syntaxhighlighter/syntaxhighlighte r.php";i:12;s:25:"wp-cumulus/wp-cumulus.php";i:13;s:27:"wp-pagenavi/wp-pagenavi.php";};
$b = unserialize($a);
print_r($b);
$c =[
accelerated-mobile-pages/accelerated-moblie-pages.php,
akismet/akismet.php,
classic-editor/classic-editor.php,
contact-form-7/wp-contact-form-7.php,
disable-google-fonts/disable-google-fonts.php,
golang-brush-for-syntaxhighlighter-evolved/syntaxhighlightter-gobrush.php,
hueman-addons/ha-fire.php,
light/light.php,
nimble-builder/nimble-builder.php,
regenerate-thumbnails/regenerate-thumbnails.php,
SyntaxHighlighter/SyntaxHighlighter.php,
wp-pagenavi/wp-pagenavi.php
]#atfp_close_translate_span#;
print_r($c);
$d = serialize($c);
print_r($d);
exit;
?>
array
( (
[0]=> accelerated-mobile-pages/accelerated-moblie-pages.php
[1]=> akismet/akismet.php
[2]=>classic-editor/classic-editor.php
[3]=> contact-form-7/wp-contact-form-7.php
[4]=> disable-google-fonts/disable-google-fonts.php
[5]=> golang-brush-for-syntaxhighlighter-evolved/syntaxhighlightter-gobrush.php
[6]=> hueman-addons/ha-fire.php
[7]=> light/light.php
[8]=> nimble-builder/nimble-builder.php
[9]=> regenerate-thumbnails/regenerate-thumbnails.php
[10]=> SyntaxHighlighter/SyntaxHighlighter.php
[11]=> wp-pagenavi/wp-pagenavi.php
)
a:12:{i:0;s:53:"accelerated-mobile-pages/accelerated-moblie-pages.php";i:1 ;s:19:"akismet/akismet.php";i:2;s:33:"classic-editor/classic-editor.php";i: 3;s:36:"contact-form-7/wp-contact-form-7.php";i:4;s:45:"disable-google-fon ts/disable-google-fonts.php";i:5;s:72:"golang-brush-for-syntaxhighlighter-e volved/syntaxhighlighter-gobrush.php";i:6;s:25:"hueman-addons/ha-fire.php" ;i:7;s:15:"light/light.php";i:8;s:33:"nimble-builder/nimble-builder.php";i: 9;s:47:"regenerate-thumbnails/regenerate-thumbnails.php";i:10;s:39:"syntaxh IGHLIGHTER/SyntaxHighlighter.php";i:11;s:27:"wp-pagenavi/wp-pagenavi.php";}
update `ShuijingWanWq`.`wp_options` set `option_value`=a:12:{i:0;s:53:"accelerated-mobile-pages/accelerated-moblie-pages.php";i:1 ;s:19:"akismet/akismet.php";i:2;s:33:"classic-editor/classic-editor.php";i: 3;s:36:"contact-form-7/wp-contact-form-7.php";i:4;s:45:"disable-google-fon ts/disable-google-fonts.php";i:5;s:72:"golang-brush-for-syntaxhighlighter-e volved/syntaxhighlighter-gobrush.php";i:6;s:25:"hueman-addons/ha-fire.php" ;i:7;s:15:"light/light.php";i:8;s:33:"nimble-builder/nimble-builder.php";i: 9;s:47:"regenerate-thumbnails/regenerate-thumbnails.php";i:10;s:39:"syntaxh IGHLIGHTER/SyntaxHighlighter.php";i:11;s:27:"wp-pagenavi/wp-pagenavi.php";}where `option_id`=35;
10. After restoring the changes in step 2, refresh the page again, and the display is normal.


