程序笔记   发布时间:2022-07-19  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了WordPress博客程序搭建大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

  WordPress是一套利用php语言和MySQL数据库开发的开源免费Blog(博客,网站)程序,用户可以在支持php环境和MySQL数据库的服务器上建立Blog站点,它的功能非常强大,插件众多,易于扩充功能,其安装和使用也特别方便,目前WordPress已经成为主流的Blog 搭建平台。

首先进行MySQL数据库的配置准备

[root@web1 mysql]# @H_18_5@mysql -uroot -p    #登录数据库Enter password:   #注意密码一定要输入正确   WANGju123Welcome to the MySQL monitor. Commands end with ; or g.Your MySQL connection id is 24Server version: 5.7.26 MySQL Community Server (GPL)

Copyright (C) 2000, 2019, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of @R_874_8917@ respectiveowners.

Type 'Help;' or 'h' for Help. Type 'c' to clear the current input statement.

wangju [(nonE)]>create database wordpress;     #创建一个数据库Query OK, 1 row affected (0.21 seC)

wangju [(nonE)]>show databases like 'wordpress';   #查看创建的数据库+----------------------+| Database (wordpress) |+----------------------+| wordpress |+----------------------+1 row in set (0.12 seC)

wangju [(nonE)]>grant all on wordpress.* to wordpress@'localhost' identified by '123456';       #创建一个专用的WordPress Blog管理用户Query OK, 0 rows affected, 1 warning (0.13 seC)

wangju [(nonE)]>flush privileges;    #刷新数据,不是必须的一步Query OK, 0 rows affected (0.56 seC)

wangju [(nonE)]>show grants for wordpress@'localhost';    #查看用户对应的权限+------------------------------------------------------------------+| Grants for wordpress@localhost |+------------------------------------------------------------------+| GRANT USAGE ON *.* TO 'wordpress'@'localhost' || GRANT ALL PRIVILEGES ON `wordpress`.* TO 'wordpress'@'localhost' |+------------------------------------------------------------------+2 rows in set (0.00 seC)

wangju [(nonE)]>SELEct user,authentication_String,host from mysql.user;      #查看用户列表命令+---------------+-------------------------------------------+-----------+| user | authentication_String | host |+---------------+-------------------------------------------+-----------+| root | *2145DDAC91291B14D18A7DDB57E33BD31A7CA3BF | localhost || mysql.session | *THISIsnoTAVALIDpassworDTHATCANBEUSEDHERE | localhost || mysql.sys | *THISIsnoTAVALIDpassworDTHATCANBEUSEDHERE | localhost || wordpress | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 | localhost |+---------------+-------------------------------------------+-----------+4 rows in set (0.00 seC)

wangju [(nonE)]>quit   #退出数据库Bye

其次配置支持LNMP的php文件(可参LNMP环境搭建二)

[root@web1 extra]# vim 03_blog.conf

server { listen 80; server_name blog.etiantian.org; LOCATIOn / { root html/blog; index index.php index.html index.htm;    #补充一个首页文件index.php在前面 } LOCATIOn ~ .*.(php|php5)?$ { root html/blog; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi.conf; } }

[root@web1 extra]# ../../sbin/nginx -t   #配置完成后进行常规检查nginx: the configuration file /application/nginx-1.16.0//conf/nginx.conf syntax is oknginx: configuration file /application/nginx-1.16.0//conf/nginx.conf test is successful[root@web1 extra]# ../../sbin/nginx -s reload

获取WordPress博客程序,并放在Blog域名对应的虚拟主机的站点目录下,即html/blog

[root@web1 extra]# cd ../../html/blog/     #首先在官网上下载文件wordpress-5.7.2.tar.gz,然后传到Linux系统中

[root@web1 blog]# rz -E   #文件传送rz waiTing to receive.[root@web1 blog]# ls index.html test_info.php test_R_889_11845@ysql.php wordpress-5.7.2.tar.gz[root@web1 blog]# ls -lsh wordpress-5.7.2.tar.gz16M -rw-r--r-- 1 root root 16M 7月 3 17:23 wordpress-5.7.2.tar.gz[root@web1 blog]# tar xf wordpress-5.7.2.tar.gz   #解压文件[root@web1 blog]# lsindex.html test_info.php test_R_889_11845@ysql.php wordpress wordpress-5.7.2.tar.gz

[root@web1 blog]# @H_18_5@mv wordpress/*   .      #把程序内容移动到blog根目录[root@web1 blog]# /bin/mv wordpress-5.7.2.tar.gz /home/wangju/tools/    #移走源程序备份[root@web1 blog]# chown -R nginx.nginx ../blog/     #授权Nginx及php服务可以访问Blog站点目录

支持,准备工作做好了,接下来,我们准备安装博客程序,在浏览器中输入"blog.etiantian.org" ,选择语言为简体中文,即可看到下图

WordPress博客程序搭建

 

 点击“现在就开始”按钮,在出现的表单中填写相应的内容

WordPress博客程序搭建

 

 填好内容点击提交

WordPress博客程序搭建

 

 点击运行安装程序

WordPress博客程序搭建

 

 

WordPress博客程序搭建

 

 点击安装WordPress

WordPress博客程序搭建

 

点击登录即可登录到博客的管理后台 ,记得输入正确的用户及密码,即可进入

WordPress博客程序搭建

点击如下图所示的地方,即可编辑文章

WordPress博客程序搭建

 

 文章编辑好之后,点击右上角的发布即可

WordPress博客程序搭建

 

 发布完成之后,单击查看文章即可。

WordPress博客程序搭建

 

 

这里,便可以看到自己发布的文章,至于WordPress的其他的功能,需要大家自己慢慢挖掘。ヾ(◍°∇°◍)ノ゙

 

大佬总结

以上是大佬教程为你收集整理的WordPress博客程序搭建全部内容,希望文章能够帮你解决WordPress博客程序搭建所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。