搭建LNMP环境
请参考前面的博文自行搭建
部署WordPress
#创建数据库和用户 mysql -uroot -p123456 -S /data/3306/mysql.sock create database wordpress; show databases like "wordpress"; grant all on wordpress.* to wordpress@'127.0.0.1' identified by '123456'; flush privileges; show grants for wordpress@'127.0.0.1'; select user,host from mysql.user; quit #修改Nginx配置文件 cd /application/nginx/ mkdir conf/extra vim conf/extra/blog.conf server{ listen 80; server_name blog.peterwang.org; root html/blog; index index.php index.html index.htm; location / { if (-f $request_filename/index.html){ rewrite (.*) $1/index.html break; } if (-f $request_filename/index.php){ rewrite (.*) $1/index.php; } if (!-f $request_filename){ rewrite (.*) /index.php; } } location ~ .*\.(php|php5)?$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi.conf; } } vim conf/nginx.conf ... include extra/blog.conf; ... mkdir html/blog chown -R nginx.nginx html/blog/ sbin/nginx -t sbin/nginx -s reload #安装WordPress cd /server/tools wget https://cn.wordpress.org/wordpress-4.8.1-zh_CN.tar.gz tar xf wordpress-4.8.1-zh_CN.tar.gz mv wordpress/* /application/nginx/html/blog/
WordPress初始化
原文链接:https://www.cnblogs.com/Peter2014/p/7520487.html
© 版权声明
声明📢本站内容均来自互联网,归原创作者所有,如有侵权必删除。
本站文章皆由CC-4.0协议发布,如无来源则为原创,转载请注明出处。
THE END