博客迁移到CentOS8,升级PHP到7.4

1、httpd配置
httpd -t报错
AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/httpd/conf/httpd.conf:360
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 192.210.231.236. Set the 'ServerName' directive globally to suppress this message
Syntax OK

说明:
NameVirtualHost 这个已经废弃了,将其去掉就行了
第二个放着没问题

2、访问站点提示:此站点遇到了致命错误
需要打开WP_DEBUG为true,报错
Deprecated: load_plugin_textdomain was called with an argument that is deprecated since version 2.7.0 with no alternative available. in /home/live-in.org/wp-includes/functions.php on line 5155
试试安装php7.4

3、安装php7.4
安装最新epel
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

安装remi源
yum -y install https://rpms.remirepo.net/enterprise/remi-release-8.rpm

列表查看php
dnf module list php

安装工具包
dnf install dnf-utils

安装php7.4
yum search php74*
yum install php74-php php74-php-bcmath php74-php-cli php74-php-common php74-php-devel php74-php-gd php74-php-mbstring php74-php-mysqlnd php74-php-pdo php74-php-pear php74-php-process php74-php-xml php74-php-xmlrpc

4、安装完php,发现页面可以打开但是functions.php错误提示还有,好像没关系,于是把WP_DEBUG恢复为false

参考资料:
https://www.cnblogs.com/alliancehacker/p/12255445.html