跳转到帖子
View in the app

A better way to browse. Learn more.

网域社区-让世界触手可及

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
欢迎来到网域社区,网域社区以延续互联网共享精神为荣!我们免费分享开心版(破解版)软件、php源码等;

推荐的帖子

发布于

Thats Nice Reaction GIF by MOODMAN

基于本博客通过子目录安装并运行 WordPress 做出详细教程方法

linux
宝塔面板
php8.0
wordpress6.6

安装宝塔面板

进入宝塔官网,选择对应设备的安装脚本

ssh 连接到你的 Linux 主机,输入在官网复制的脚本,按回车,等待一会

安装好宝塔后到登录宝塔面板在应用商店安装需要的 php 版本,一般是 8.0,第一次登录宝塔会弹出系统应用全家桶,选择推荐的那个 nginx 的

部署 wordpress

进入正题,在宝塔面板点击【网站】选项,进入后点击网站选项,在刷新出的页面中点击【添加网站】按钮

然后在弹出的窗口中选择一键部署

选择 wordpress,网站域名就写 www.xxx.com,不要多写,网站目录可以在主目录下创建一个子目录

/www/wwwroot/www.xxx.com/blog

如上所示,然后复制一下数据库的账号和密码

配置 wordpress

返回网站选项,在你的 wordpress 部署的域名上点击设置,设置网站运行目录为

www/wwwroot/www.xxx.com/blog

就是刚刚设置的子目录

注意,这是临时目录,只是为了方便安装

设置 ok 后点击域名进行访问,wordpress 会自动运行安装程序,这里都正常搞,数据库为了防止混合建议设置数据表前缀为 blog_

接下来重点来了

进入 wordpress 后台,点击菜单栏中的【设置】【常规】

http://img.cdn.gsav.cn/IMG_blog/2024/07/3793f17e67a36383fcac9b39c4b473d-300x97.png

将这两个 url 地址都改成你想要通过子目录访问的文件名名称

例如你的主目录是 /www/wwwroot/www.xxx.com

子目录是 /www/wwwroot/www.xxx.com/blog

那么框里就填【http://www.xxx.com/blog/】

保存好后你就访问不了了,接下来你需要到宝塔面板中网站设置设置网站运行目录为 /www/wwwroot/www.xxx.com

因为之前写了目录是 /www/wwwroot/www.xxx.com/blog

接下来不要退出网站设置,,点击【伪静态】这时 wordpress 的伪静态已经不起作用了需要改动一下

location /blog{try_files $uri $uri/ /blog/index.php?$args;}rewrite /blog/wp-admin$ $scheme://$host$uri/ permanent;

复制粘贴上就可以了

注意,如果你没有使用 /blog 作为子目录,请将上述代码中的【blog】全部更换为你自定义的子目录文件名

成功

通过访问你的域名+/blog 或者其他自定义子目录名称,查看是否能正常访问

参与讨论

你可以现在发布并稍后注册. 如果你有帐户,现在就登录发布帖子.

游客
回帖…

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.