Using different sub domains and servers

Hello,
I am developing project which uses three two subdomains, and a main domain, either on different servers entirely, or a multi-site setup.

#1 payments.domain.com
#2 dashboard.domain.com
#3 domain.com

All the signup forms are going to be on #3, the actual payment gateway and user information is on #1. #2 is the actual service and product of the project.

I think it is better to separate the different parts as such, completely separate from each other. My question is, how can site #2 validate a user login that exists on site #1. Perhaps like a license server.

Thank you.

  • Rupok

    Hi Zarrar

    I hope you had a wonderful day.

    This is a good way of planning, but WordPress by default doesn't work in this way. WordPress is a single DB application and in default scenario, it expects its core resource location to be one single place.

    When we developer large scale applications, we divide the tasks among different layers and disburse process to remote hosts. In custom application, you can do this because you build your own architecture. But in WordPress, doing so will be a critical job and will require advance coding and high volume customization to the core.

    I've got a workaround which might be helpful in what you are trying to achieve. First, you can setup a subdomain multisite, suppose http://domain.com which is #3. Then create #1 and #2 subsites. Now you can create all the signup forms in #3, that's easy. Then install "WordPress User Sync" plugin which is from us. It will sync all your users in between #1, #2 and #3. As the main user information is on #1, you can handle the actual service and product of the project in #2. We have an awesome plugin called "MarketPress" for ecommerce purpose. You can try that out.

    Let us know if you have any suggestions of confusion. We will be glad to consult.

    Have a nice day. Cheers!
    Rupok

  • Zarrar

    Hi Rupok,
    Thank you for the great response. Is there a way to have separate datbases for each site? There is a plugin on WPMUDEV that does this, I have not tried this out yet. In addition, there are database database utility tools such as Navicat, Webyog, and others which can build queries to manage tables, and even create an entirely new database outside WP which can be referenced later, or users imported from there, and other scenarios.

    The main reason for the separation is security and a fail safe mechanism. At the very least the DB need to be separate.

    Thanks.

  • Kasia Swiderska

    Hello Zarrar,

    I'm sorry for confusion, you are right, user Sync is only for the Single Installations. There is other plugin for this https://wordpress.org/plugins/multisite-user-management/ - when users are registering on one subsite it creates their accounts on rest of the subsites in network.

    Thank you for the great response. Is there a way to have separate datbases for each site? There is a plugin on WPMUDEV that does this, I have not tried this out yet.

    Yes, Multi DB, but you will see that this plugin is retired and will have only security fixes, otherwise no support for it.
    But there is another plugin that will allow you to do that https://pl.wordpress.org/plugins/hyperdb/ and it has more options.

    kind regards,
    Kasia

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.