CentOS 7 安装 WordPress

参考0:https://blog.csdn.net/abcd5711664321/article/details/122554412

参考1:https://www.yii666.com/article/551970.html

参考2:https://www.cnblogs.com/yanans/p/12945001.html

 

 

修改文件 /etc/httpd/conf/httpd.conf(一行不改也可以)

 

一行不改,原来是这样的

 

 

 

浏览器输入http://172.17.6.13:9999/test/test.php

如果看到的test.php

打开这个文件/etc/opt/remi/php74/php.ini

short_open_tag = On 打开,然后systemctl restart httpd

 

部署中遇到的问题解决

1.部署完成打开首页提示Your server is running PHP version 5.4.16 but WordPress 5.4.1 requires at least 5.6.20
解决办法:
1.查看信息:yum provides php
2.更新源:
rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
3.移除系统自带的php-common:yum remove php-common -y
4.安装依赖包:yum install -y php72w php72w-opcache php72w-xml php72w-mcrypt php72w-gd php72w-devel php72w-mysql php72w-intl php72w-mbstring
5.查看版本:php -v

 

 

 

将wordpress放在以下目录中

/var/www/html/wordpress  权限改为root:root

chown root:root -R /var/www/html/wordpress

php-fpm   php82-php-fpm 不需要启用,没有什么用

posted @ 2023-05-18 20:10  LiuYanYGZ  阅读(116)  评论(0编辑  收藏  举报