Wordpress - 具有相同数据库表的多个博客页面

发布于 2024-11-03 09:42:37 字数 172 浏览 4 评论 0原文

我正在努力彻底升级网站。 当前网站有一个使用 Wordpress 的博客。

基本上,我想在同一台服务器上设置新博客(新站点位于单独的目录中),但我希望这两个博客(当前使用的博客和新博客)从桌子。

谁能给我任何帮助来完成这个任务?

我不想意外地清理桌子,

谢谢,汤姆。

I'm working on upgrading a website completely.
The current website has a blog set up which uses Wordpress.

Basically, I wanted to set up the new blog on the same server (the new site is in a seperate directory), but I want both of the blogs, the currently used one and the new one, to pull the same post information from the table.

Can anyone give me any help as to accomplishing this?

I don't want to accidentally end up clearing the table

Thanks, Tom.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

他夏了夏天 2024-11-10 09:42:37

我认为你可以在安装Wordpress时设置数据库sql前缀(我认为默认是wp_)

确保你选择其他一些前缀:)

这将允许你在同一个服务器上和同一个SQL数据库中运行多个博客

I think you can set a database sql prefix when installing Wordpress (default is wp_ I think)

Make sure you pick some other prefix :)

This will allow you to run multiple blogs on the same serve and in the same SQL database

岁月苍老的讽刺 2024-11-10 09:42:37

如果您想在两个站点中发布相同的帖子,只需将它们指向配置文件中的相同数据库(不要使用自动安装脚本 - 在配置文件中手动执行所有配置)。请注意,他们还将共享大部分配置,尤其是插件配置等。

当然,在执行任何操作之前备份数据,以便在出现错误时可以恢复。

If you want the same posts in both the sites, just point them to the same database in the configuration file (do not use the automatic install script - do all configuration manually in the config file). Note that they also will have most of the configuration shared as well, especially plugin configurations and the like.

And of course, back up your data before doing anything so you can revert back if you do something wrong.

恋你朝朝暮暮 2024-11-10 09:42:37

当然,你可以这样做。复制 wp-config.php 文件,包括密钥。但为什么?你想做什么?

并意识到你必须在每个 WP 安装中保留完全相同的插件,因为如果你向一个将配置写入数据库的插件添加一个插件,另一个安装也会查找该插件并在它出现时抛出错误(至少)没有找到它。

Sure, you can do that. Duplicate the wp-config.php files, including the secret keys. But why? What are you trying to do?

And realize that you have to keep exactly the same plugins in each WP install, because if you add a plugin to one that writes configs to the database, the other install will also look for that plugin and throw errors (at very least) when it doesn't find it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文