安装的mariadb-server使用root用户名无法登陆,需要创建一个用户名来安装wp
GRANT ALL PRIVILEGES ON databasename.* TO wordpressusername@localhost
IDENTIFIED BY "password";
databasename为wp的数据库名,wordpressusername@localhost为用户名,password 为密码,替换成你的。
nginx如果手工安装记得在
location ~ .php$ {段中的
fastcgi_pass 127.0.0.1:9000; 要与php配置文件中的一致。文件一般存放于/etc/php/7.4/fpm/pool.d/www.conf,如果没有使用ps 查看php的配置目录即可。
添加:
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
如果报404,403请修改此文件,这个跟范本中不一致。
正确的文件为:
server {
listen 80;
server_name www.vmx.im ;
access_log /var/log/nginx/vmx.im.log;
location / {
root /home/www/wordpress;
index index.php index.html index.htm;
}
location ~ \.php$ {
root /home/www/wordpress;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/conf/fastcgi_params ;
}
}
文章评论