Wordpress - 具有相同数据库表的多个博客页面
我正在努力彻底升级网站。 当前网站有一个使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我认为你可以在安装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
如果您想在两个站点中发布相同的帖子,只需将它们指向配置文件中的相同数据库(不要使用自动安装脚本 - 在配置文件中手动执行所有配置)。请注意,他们还将共享大部分配置,尤其是插件配置等。
当然,在执行任何操作之前备份数据,以便在出现错误时可以恢复。
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.
当然,你可以这样做。复制 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.