宝塔面板添加wordpress问题记录
分类: 解决问题 0 0
一、安装准备
- 准备一台服务器,这里我使用的是阿里云服务ECS
- 安装宝塔面板,详细步骤参考 服务器如何安装宝塔面板?宝塔面板安装教程
- 安装wordpress,详细步骤参考 宝塔wordpress安装及使用(宝塔wordpress建站教程)
二、问题记录
- 运行Wordpress安装程序,访问php文件不解析直接下载
解决方法:
- 运行Wordpress安装程序,访问php文件不解析直接下载
- 修改nginx配置文件,添加以下内容
- server {
- listen 3002;
- server_name serverName;
- root /www/wwwroot/http/;
- location / {
- index index.php index.html index.htm;
- try_files $uri $uri/ /index.php?q=$uri&$args;
- }
- location ~ .php$ {
- root /www/wwwroot/http/;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include fastcgi_params;
- }
- }
- 修改php-fpm配置文件,切换到服务器根目录,然后可以通过
find / -name "php-fpm.conf"
查询配置文件
修改框起来的部分内容
- 访问数据库管理提示405
解决方法:
php和phpMyAdmin版本不对应导致的,我们只要把现有的phpMyAdmin卸载掉,再重新安装一个符合要求的版本即可。
最终测试正常版本php:v.7.4,phpMyAdmin:v.4.9
发表评论
昵称、邮箱为必填项,电子邮件地址不会被公开
加载中...