一,得到安装包的下载地址:
1,官网地址:https://cn.wordpress.org/如图:
![](/i/l/?n=23&i=blog/1938691/202304/1938691-20230428170821749-1166889291.png)
![](/i/l/?n=23&i=blog/1938691/202304/1938691-20230428170820978-288528071.png)
https://cn.wordpress.org/latest-zh_CN.zip
说明:刘宏缔的架构森林是一个专注架构的博客,地址:https://www.cnblogs.com/architectforest
对应的源码可以访问这里获取: https://github.com/liuhongdi/
或: https://gitee.com/liuhongdi
说明:作者:刘宏缔 邮箱: [email protected]
二,下载wordpress:
1,下载[root@blog ~]# cd /usr/local/source/ [root@blog source]# mkdir wp [root@blog source]# cd wp [root@blog wp]# wget https://cn.wordpress.org/latest-zh_CN.zip2,解压:
[root@blog wp]# unzip latest-zh_CN.zip
三,配置:
1,创建数据库:![](/i/l/?n=23&i=blog/1938691/202304/1938691-20230428170821224-1081033483.png)
mysql> CREATE USER wpuser; ERROR 1396 (HY000): Operation CREATE USER failed for 'wpuser'@'%' mysql> SET PASSWORD FOR wpuser = "password"; Query OK, 0 rows affected (0.00 sec) mysql> GRANT ALL PRIVILEGES ON wordpress.* TO wpuser; Query OK, 0 rows affected (0.00 sec) mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec) mysql> quit Bye3,配置nginx虚拟主机: 把wordpress目录下的代码移动到指定目录下
[root@blog web]# cd /web/wp [root@blog wp]# mv /usr/local/source/wp/wordpress/ /web/wp/创建上传目录
[root@blog wp]# mkdir wordpress/wp-content/uploads指定owner和mod
[root@blog wp]# chown -R nginx:nginx /web/wp/wordpress [root@blog wp]# chmod -R 755 /web/wp/wordpress查看nginx到wp的配置文件
[root@blog conf.d]# more wp.conf server { listen 80; server_name wp.liuhongdi.com; root /web/wp/wordpress; index index.php v.php index.html index.shtml index.htm; access_log /data/logs/nginxlogs/wp.access_log; error_log /data/logs/nginxlogs/wp.error_log; limit_req zone=reqperip burst=20 nodelay; location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_buffer_size 32k; fastcgi_buffers 10240 32k; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } }
四,开始通过web进行安装过程:
访问: wp.liuhongdi.com, 如图:![](/i/l/?n=23&i=blog/1938691/202304/1938691-20230428170821777-1964386344.png)
![](/i/l/?n=23&i=blog/1938691/202304/1938691-20230428170821813-1106609454.png)
![](/i/l/?n=23&i=blog/1938691/202304/1938691-20230428170821834-78540819.png)
![](/i/l/?n=23&i=blog/1938691/202304/1938691-20230428170821236-1512748718.png)
![](/i/l/?n=23&i=blog/1938691/202304/1938691-20230428170821526-946171685.png)
五,查看版本:
1,查看wordpress的版本:![](/i/l/?n=23&i=blog/1938691/202304/1938691-20230428170821826-234541502.png)
[root@blog ~]# /usr/local/soft/php7/bin/php --version PHP 7.4.2 (cli) (built: Apr 20 2022 16:49:58) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies
标签:web,blog,wordpress,6.2,wp,php,root From: https://www.cnblogs.com/architectforest/p/17362706.html