f9yx0du 发表于 2024-10-5 03:01:17

个人博客搭建保母级教程1——WordPress


    <h1 style="color: black; text-align: left; margin-bottom: 10px;">个人博客搭建<span style="color: black;">保母</span>级教程1——WordPress</h1>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">今天用WordPress搭建一个个人博客站。废话不说了,开搞。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;"><span style="color: black;">1、</span>Windows教程</span></strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">1.环境准备</span></strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">1.phpstudy(一个集<span style="color: black;">成为了</span>PHP MySQL Redis Apache Nginx等一系列工具的软件,让服务器配置简单化。)</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">2.WordPress(<span style="color: black;">因为</span>是开源项目,<span style="color: black;">咱们</span>直接clone就好。)</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">phpstudy安装,一路下一步就好。 Word Press下载,<span style="color: black;">倘若</span>装了git,直接输入以下命令就好。</span></p>git clone https://github.com/WordPress/WordPress.git
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">无</span>git,那就打开网站(</p>https://github.com/WordPress/WordPress)
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-axegupay5k/9f921ad398cd45eaa47964b254909a61~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1728294532&amp;x-signature=03JyjcotVEP5X1kvYoMhM4gC%2F3M%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">点击冒绿光的Code,<span style="color: black;">而后</span>点击Download ZIP,<span style="color: black;">而后</span>解压得到源码。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">2.搭建环境</span></strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">打开phpstudy</span></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/5e9c770858d94c9b885834f51bdbb59d~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1728294532&amp;x-signature=69kf0ctTgmQPIzES4QbLrN0Jj%2F4%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">开启apache</span></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/cd0a8ada6c3045ebb2595b827d61198c~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1728294532&amp;x-signature=MI2DvocSVlknrkPv7pgZF%2BYVGOA%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;"><span style="color: black;">重视</span>:<span style="color: black;">倘若</span><span style="color: black;">显现</span>端口被占用,<span style="color: black;">处理</span><span style="color: black;">方法</span>:1.netstat -ano (cmd执行,找到占用端口进程的PID,打开任务管理器,点击结束,之后<span style="color: black;">起步</span>apache)</span></strong></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/0894824406034d6380e7402ec873ee33~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1728294532&amp;x-signature=aElL82rVC%2F0pByii7sMsgtRRUtQ%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">创建网站:</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">域名:</span></strong><span style="color: black;"> (wordpress.myblog.com)(这玩意自己编一个,外网<span style="color: black;">没法</span><span style="color: black;">拜访</span>哦(当然<span style="color: black;">经过</span>某些骚操作<span style="color: black;">亦</span><span style="color: black;">能够</span>),<span style="color: black;">倘若</span>要用外网<span style="color: black;">拜访</span>,需要公网ip,改天出个购买服务器与域名的<span style="color: black;">文案</span>)</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">端口:</span></strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 默认80,<span style="color: black;">倘若</span>改了其他端口,在浏览器<span style="color: black;">拜访</span>时需要加端口号。ex:</p>http://wordpress.myblog.com:10000
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">根目录:</span></strong><span style="color: black;"> 随意,我用默认的。</span></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/626975fa65964e1b9995705053b1d025~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1728294532&amp;x-signature=e1aLSK6ON21TTjltgsWGufPh%2FWU%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">拜访</span>一下,成功了。(<span style="color: black;">倘若</span><span style="color: black;">无</span>出来,刷新一下呦)</span></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/f5eee91995f845f6a7f18bd3f29d67a9~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1728294532&amp;x-signature=ATXb%2FNsFPIah%2FZnOQpUnJvlbLuY%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">安装<span style="color: black;">安排</span>wordpress,将下载的源码解压,移动到网站的根目录。</span></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/feb88f25e0a9485291b10096648c1bbc~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1728294532&amp;x-signature=0sOwL9sFqv0ZtDzFxzab88LtZjI%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">在浏览器打开 </p>http://wordpress.myblog.com/wp-admin/setup-config.php (把域名换成自己的)
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">点击lets go</span></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/c4e4a1a75c954849a5b496c0e98a34b6~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1728294532&amp;x-signature=9%2Fcy9uJMUhtD4DnIAW7FmyEDnKk%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">数据库名:WPmyblog(随意,稍后得去创建,要与后面创建数据库一致)</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">数据库用户名:wuhen(随意,要与后面创建数据库一致)</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">秘码</span>:123456(自己填,要与后面创建数据库一致)</span></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/68a9c8a96cd74c868e330609e69e447e~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1728294532&amp;x-signature=PE8idCTWPEEe%2B2hguqxw2Y7C3cE%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">先去安装,<span style="color: black;">起步</span>mysql,创建对应数据库。phpstudy集<span style="color: black;">成为了</span>mysql,直接安装就好。我这装了mysql8.0.12。</span></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/5fdd914ff4cc44f496c53ea1991177b0~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1728294532&amp;x-signature=YguIVwVNeDtKhcdaN3iizZDRrWQ%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">创建数据库,要与前面表格填写的一致。</span></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/6f0fcbad08aa4d859a1aaa3b78e374b9~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1728294532&amp;x-signature=JX6Uw%2BLjkBpgpHpCirGwO3Li6UU%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">点击submit,看到此页面。</span></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/1939a4811c174e1c9dbe792f012491e6~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1728294532&amp;x-signature=r%2BlCVlD%2BfKWV4wtu%2BNTq6l8hkd0%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">点击 Run........,等待。填写好信息,点击Install</span></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/ce0368b15ff6412c8a6847bee7e1d7c3~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1728294532&amp;x-signature=DJY6BHangdjImnm5ohgkXQaO8zE%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">成功了!!!!!!!恭喜</span></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/30ccee2b373840d2946ab923cd952871~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1728294532&amp;x-signature=1784ogL5cEseTLjueZRVhVN9Sek%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">点击Log in</span></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/e06f0849fb5a4792ae6ea81b9a53a1a8~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1728294532&amp;x-signature=bDfLW75o6WhWs2mRshIZgszgU18%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">成功进入。在这你<span style="color: black;">能够</span>将语言更改为中文,<span style="color: black;">亦</span><span style="color: black;">能够</span>更改主题,自己去尽情地探索吧,奥里给。</span></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/8a6fc31d52a949eeb6e76035b4a79ddf~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1728294532&amp;x-signature=GmDB844cNo%2FTf%2FI7k%2Bmo0O%2Ba9hs%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;"><span style="color: black;">2、</span>Linux教程</span></strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">1.环境准备</span></strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">1.ubuntu16.04(看我博客有教程)</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">2.LAMP环境,装系统时默认装了。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">2.环境搭建</span></strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">执行命令,切换为root</span></p>sudo su
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p26-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/d140b0162dff43e5bc906967250590b5~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1728294532&amp;x-signature=BLb0HMFjLNnMo6Hy4JkJ2lBfec4%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">执行命令,查看下ip,我的ip是192.168.190.132</span></p>ifconfig
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/ffcff8b45c944835985c9b7b020d571d~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1728294532&amp;x-signature=WTysNjV3ZUt4UvMfC1C31DWrHss%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">在浏览器<span style="color: black;">拜访</span>192.168.190.132,<span style="color: black;">能够</span>看到默认页面,根目录在/var/www/html/,该页面是index.html<span style="color: black;">供给</span>的。</span></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/2b2906ef38ae4ec3a9d5f1080ef00b1d~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1728294532&amp;x-signature=xTnullDoRZgKZhP31N4FEYpb%2Blo%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">执行命令,切换目录</span></p>cd /var/www/html
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">而后</span>执行命令,将WordPress clone下来。<span style="color: black;">因为</span>某种<span style="color: black;">原由</span>,clone有些慢。</span></p>git clone https://github.com/WordPress/WordPress.git<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">拜访</span> </p>http://192.168.190.132/WordPress/wp-admin/install.php ,接下来的操作与windows<span style="color: black;">类似</span>,重点说下创建数据库。

    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/46e0b3e6b0784f8bbc451b2f0d8786b9~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1728294532&amp;x-signature=jzZieOe5OkrtrjyO0T1B6EwUt4M%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">创建数据库,执行命令,输入MySQL<span style="color: black;">秘码</span>,<span style="color: black;">而后</span>连接。</span></p>mysql -u root -p
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/8dea00618c024686be6abbe68148eefd~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1728294532&amp;x-signature=SXMseMPJEWETUc4d%2F8%2BibDK1iDs%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">执行命令,创建数据库(数据库名随意,与安装时填一致就好,数据库默认root,<span style="color: black;">秘码</span>是安装Ubuntu16.04时你自己设的)</span></p>create database WPmyblog;
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p6-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/2442ff43335e4356b760dd9208c949be~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1728294532&amp;x-signature=HIvoQpAX7Khqy%2BGTmasq6N5IlWw%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">输入命令,查看<span style="color: black;">是不是</span>成功。成功后输入exit退出。</span></p>show databases;
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/1438b5003d19400fa532a2ca66cb1197~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1728294532&amp;x-signature=ZBwfXlCF9%2BXQp8aFybC6hbhwMKg%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/33d6796ef4504300affcd7352ce589af~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1728294532&amp;x-signature=8W%2BuPdG3bBPrVdCm6Q6BTPiEej4%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">好啦,WordPress的教程到此为止,<span style="color: black;">期盼</span><span style="color: black;">能够</span>帮到<span style="color: black;">大众</span>。</span></p>




j8typz 发表于 2024-10-7 19:34:21

你说得对,我们一起加油,未来可期。

wrjc1hod 发表于 2024-10-18 07:11:51

感谢您的精彩评论,为我带来了新的思考角度。
页: [1]
查看完整版本: 个人博客搭建保母级教程1——WordPress