部署在腾讯云
需要:
- 注册一个域名
- 申请一个轻量级应用服务器,配置:CPU 1核 – 内存 2GB – 系统盘 50GB
搭建:
- 网站备案
- 选择wordpress,自定义主题
网站首页底部未添加备案号
底部默认长这样:

工信部要求显示 备案号,并能够点击跳转.
解决方案:
- 登陆主机,网站根目录在:
/usr/local/lighthouse/softwares/wordpress
2. 搜索这行信息:
grep "Powered by" -rn ./

3. 直接改代码:
// 原来的代码
printf(
/* translators: %s: theme name with URL */
esc_html_x( 'Powered by %s', 'footer credit', 'pressbook' ),
'<a href="' . esc_url( PressBook\Helpers::get_theme_url() ) . '" itemprop="url">' . sprintf(
/* translators: %s: theme name */
esc_html_x( '%s WordPress theme', 'footer credit', 'pressbook' ),
esc_html( PressBook\Helpers::get_theme_name() )
) . '</a>'
);
// 改为:
printf(
esc_html_x( ' %s', 'footer credit', 'pressbook' ),
'<a href="' . esc_url('https://beian.miit.gov.cn/' ) . '" itemprop="url">' . sprintf(
esc_html_x( '粤ICP备2021168298号', 'footer credit', 'pressbook' )
) . '</a>'
);
编辑主页菜单
记不住的最佳方式就是截个图保存:

吐槽wordpress
还是没记住,,,傻逼后端管理页面,管理杂乱。。
如果主菜单要增加一个新的标签页,当前站点选择的是:
- 创建分类

2. 在“自定义” – 菜单 – 主菜单 – 添加项目 – 分类


3. 写新文章,选择刚才创建的分类即可
备注:关于我 是一个独立的页面,不是分类。