新建wordpress网站
网站存放目录
mkdir -p /var/www
下载wordpress最新版本
wget https://wordpress.org/latest.zip
安装zip工具
yum install zip unzip
解压到/var/www目录下,之后你的网站根目录为/var/www/wordpress
unzip latest.zip -d /var/www
新建Nginx网站配置
vi /etc/Nginx/conf.d/wordpress.conf server { listen 80; server_name wordpress; root /var/www/wordpress; index index.html index.htm index.PHP; client_max_body_size 2m; client_header_buffer_size 128k; large_client_header_buffers 4 128k; location / { try_files $uri $uri/ /index.PHP?$args; } 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; } }
配置生效
Nginx -s reload
MysqL -u root -p CREATE DATABASE `wordpress` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; exit;原文链接:https://www.f2er.com/centos/375383.html