1.下载WordPress安装包
wordpress-5.5.1.tar.gz
2. 将wordpress-5.5.1.tar.gz上传到Linux的“/usr/local”目录下
3. 解压并复制wordpress到nginx根目录下
[root@iZm5e0ruj2b7jdo68j6u4nZ local
]
[root@iZm5e0ruj2b7jdo68j6u4nZ local
]
4. 修改nginx的配置文件
user wordpress
;
worker_processes 1
;
events
{
worker_connections 1024
;
}
http
{
include mime.types
;
default_type application/octet-stream
;
sendfile on
;
keepalive_timeout 65
;
server
{
listen 80
;
server_name localhost
;
root html/wordpress
;
location /
{
root html/wordpress
;
index index.php index.html index.htm
;
}
error_page 500 502 503 504 /50x.html
;
location
= /50x.html
{
root html
;
}
location ~ \.php$
{
fastcgi_pass 127.0.0.1:9000
;
fastcgi_index index.php
;
fastcgi_param SCRIPT_FILENAME
$document_root$fastcgi_script_name;
include fastcgi_params
;
}
}
}