Support » Networking WordPress » How assign automatically domains to users subdomains after payments

  • How assign automatically domains to users subdomains after payments.

    Function like a WordPress.com for premium plans.

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    You need your DNS zone file to be able to accept wildcard subdomains. If that’s the case, depending on your site settings, any logged in user could self-register new sites. It’s thus a matter of managing user roles and capabilities so that only paying users can add sites, as opposed to anyone adding sites. Changing roles and capabilities can be done via code, but exactly how that would work would depend on how your payments are processed. Upon successful payment, code would be triggered to change the user’s role so they can add their own site.

    Alternately, the code triggered after payment could simply add a site for the user with a call to wpmu_create_blog().

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.