drf16571 2016-04-21 17:52
浏览 11
已采纳

2个Wordpress安装1个DB(有点)

I am working on a admin page on a different sub domain.

e.g Main website - www.mydomain.com Admin Website - admin.mydomain.com

Both websites have completely different themes because Admin Website will be running a customise theme, and will have additional backend features like accounting/CRM etc.

I'm currently running on 2 installations of wordpress and 2 databases. Main website is running a Reviews function and a Private Message function that allows me to write a review for a user, and send private message to user.

I log all reviews and private message in Main Website Database by using $wpdb->Insert

However, now, i want to let all these reviews and private message to be available to my user, and I want to let Admin Website and Main Website share same USER database (for the convenience of login and log out), because on the Admin website the user can change his personal information etc which will be reflected in the Main Website.

TLDR Version: How do I use 1 database for 2 installations and let both access get_post, get_usermeta, get_postmeta etc in their own installation?

I understand if share database i will have problem with the hyperlinks etc.

  • 写回答

1条回答 默认 最新

  • dongwen9975 2016-04-22 01:37
    关注

    You need to create install WordPress multi sites and here is the link below, http://codex.wordpress.org/Create_A_Network

    Hope this will be helpful for you.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 怎么改成循环输入删除(语言-c语言)
  • ¥15 安卓C读取/dev/fastpipe屏幕像素数据
  • ¥15 pyqt5tools安装失败
  • ¥15 mmdetection
  • ¥15 nginx代理报502的错误
  • ¥100 当AWR1843发送完设置的固定帧后,如何使其再发送第一次的帧
  • ¥15 图示五个参数的模型校正是用什么方法做出来的。如何建立其他模型
  • ¥100 描述一下元器件的基本功能,pcba板的基本原理
  • ¥15 STM32无法向设备写入固件
  • ¥15 使用ESP8266连接阿里云出现问题