当前位置:网站首页>初学者入门:使用WordPress搭建一个专属自己的博客
初学者入门:使用WordPress搭建一个专属自己的博客
2022-07-27 12:49:00 【InfoQ】
体验简介
背景知识
- 云服务器 ECS
- Wordpress
连接 ECS 服务器
安装 WordPress 中文版
wget https://cn.wordpress.org/latest-zh_CN.tar.gz
tar -zxvf latest-zh_CN.tar.gz
mkdir /var/www/html/wp-blog
mv wordpress/* /var/www/html/wp-blog/
cat -n /var/www/html/wp-blog/wp-config-sample.php
# 进入WordPress目录
cd /var/www/html/wp-blog/
# 复制模板文件为配置文件
cp wp-config-sample.php wp-config.php
# database_name_here为数据库名称
sed -i 's/database_name_here/wordpress/' /var/www/html/wp-blog/wp-config.php
# username_here为数据库的用户名
sed -i 's/username_here/root/' /var/www/html/wp-blog/wp-config.php
# password_here为数据库的登录密码
sed -i 's/password_here/NewPassWord1./' /var/www/html/wp-blog/wp-config.php
systemctl start httpd

自定义站点主题

# 首先进入WordPress主题目录
cd /var/www/html/wp-blog/wp-content/themes/
# 使用wget命令下载上一步选择的主题
wget https://downloads.wordpress.org/theme/markiter.1.5.zip
# 使用unzip命令解压安装包
unzip markiter.1.5.zip
# 查看所有主题
ll

添加自定义小组件
vim /var/www/html/wp-blog/wp-content/themes/markiter/footer.php
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/L2Dwidget.min.js"></script>
<script type="text/javascript">
L2Dwidget.init();
</script>

安装 MarkDown 插件
cd /var/www/html/wp-blog/wp-content/plugins/
wget https://downloads.wordpress.org/plugin/wp-editormd.10.1.2.zip
unzip wp-editormd.10.1.2.zip

最终实现的效果
- 博客首页

- 博客编辑页面

边栏推荐
- Open source project - taier1.2 release, new workflow, tenant binding simplification and other functions
- Will saffron become a safe and effective natural therapy for patients with arthritis?
- Reptile
- Li Kou 1480. Dynamic sum of one-dimensional array 383. Ransom letter 412. Fizz buzz
- [node+ts] build node+typescript project
- Amd adrenalin 22.7.1 driver update: double the performance of OpenGL and support Microsoft win11 22h2 system
- SQL statement problem, calculate the data with a difference of less than 10 minutes to be displayed as the same batch of data
- 一款能模糊的地方都能模糊的测试工具——Wfuzz
- Bank case | ZABBIX cross version upgrade guide, isn't 4.2-6.0 popular?
- 马斯克被曝绿了谷歌创始人:导致挚友二婚破裂,曾下跪求原谅
猜你喜欢

CVPR22 | 关系意识的图神经架构搜索

Gan: generate adversarial networks

PAT乙级 1109 擅长C(详解)

字节跳动的 Flink OLAP 作业调度和查询执行优化实践

Detail try catch finally

QT excellent open source project 13: qscintilla

52:第五章:开发admin管理服务:5:开发【分页查询admin账号列表,接口】;(Swagger的@ApiParam(),对方法参数进行注释;PageHelper分页插件;拦截器拦截检查登录状态)

W3school navigation bar exercise

AMD Adrenalin 22.7.1 驱动更新:OpenGL 性能翻倍,支持微软 Win11 22H2 系统

实现新增加硬盘的磁盘分区和文件系统挂载
随机推荐
Two call processors of feign
计算字符串最后一个单词的长度,单词以空格隔开。
Background and framework introduction and basic environment preparation of hucang integrated e-commerce project
W3School导航栏练习
Bank case | ZABBIX cross version upgrade guide, isn't 4.2-6.0 popular?
A survey of video game addictive behavior research
[node+ts] build node+typescript project
Aike AI frontier promotion (7.27)
Firefox 103 发布,更快、更安全
数据库HTAP能力强弱怎么看
500强企业如何提升研发效能?来看看行业专家怎么说!
Poj1273 drainage ditches [maximum flow] [SAP]
What should I do if I can't see any tiles on SAP Fiori launchpad?
JNI程序如何进行参数传递
The role of Clearfix
Perfect guide | how to use ODBC for agent free Oracle database monitoring?
Musk was exposed to be the founder of Google: he broke up his best friend's second marriage and knelt down to beg for forgiveness
Feign的整体流程
高度塌陷和BFC
POJ1548 Robots【二分图最小路径覆盖】