多个 WordPress 可以从一个数据库中获取数据吗?
我是一名模板设计师,我想创建一个包含所有通用帖子的 WordPress,但我不想继续登录并复制和复制内容。每次都粘贴相同的 WordPress 帖子。我可以将多个 WP 安装指向一个数据库吗?一种更困难的方法是导出主数据库并将其导入到每个安装中。在我发疯并尝试一起破解一些东西之前,有人有什么建议吗? -提前致谢。
I am a template designer and I want to create one wordpress with all generic posts, but I don't want to have to keep logging in and copy & pasteing the same wordpress posts everytime. Can I point multiple WP installs to one database? A harder way would be export a master db and importing it to each install. Before I go crazy and try to hack something together, does anyone have any advise?
-Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果您使用它来通过示例内容展示各种主题,那么您就让事情变得过于复杂了。使用主题切换器像这个。
If you're using this to showcase your various themes with example content, you're overcomplicating things. Use a theme switcher like this one.
是的,你可以。它们实际上是同一个后端的不同前端。
Yes, you can. They'd actually be various frontends to same backend.
一般来说,它应该是可行的,但站点的基本 URL 和其他配置选项存储在数据库中,因此它可能无法完全正常工作。
如果这是关于生产使用中功能齐全的博客,我会非常小心地这样做。最好有一个主数据库并从那里复制帖子。不过,如果仅用于演示目的,应该没问题。
It should be doable in general, but the site's base URL and other configuration options are stored in the database, so it might not work entirely without problems.
If this is about fully functional blogs in production use, I would be very careful doing this. Better have a master database and copy the posts from there. If it's for demo purposes only, though, it should be fine.