I am using Drupal 7. I want to sync my Drupal website roles on 2 websites on the same top level domain, as in, one is example.com, the other is other.example.com, how can i achieve this? Bakery module does not seem to share user roles, and i want to avoid sharing databases across my sites since it works but not recommended.

Basically, i want to reduce loading time on my main site and push my payment system (which contains many modules) to a new Drupal install so that when the payment is made on the slave site, the user role is updated on the slave site which is in turn captured on the main site. How can i achieve this?

2 Answers 2


i cannot provide detailed steps to achieve this but there are various alternatives Comparison of Single Sign On (SSO) Modules to the bakery module you mentioned that are capable of sharing users. although you might want to just create those roles via a feature, depending on what you mean by

sync my drupal website roles.

  • Services
  • i18n_sso
  • Domainaccess
  • CAS
  • account_sync
  • simplesamlphp_auth
  • shib_auth
  • Omniauth https://drupal.org/node/2177681
  • Oauth Connector
  • Bakery 3.x current development effort suggest it might soon support exporting roles in 3.x if you are a developer you can look there. i believe issue 556666 was committed to 2.x already aswell
  • by "sync my drupal website roles" i mean that the "roles" table on site B (siteb.domain.com) is the same "roles" table being used by site A (www.domain.com) Apr 2, 2014 at 13:02
  • 1
    in that case you might want to consider using drupal.org/project/role_export with features for ensuring the roles are the same accross sites
    – discipolo
    Apr 3, 2014 at 13:32

Typically when staging roles on D7 across multiple environments or sites is tricky since roles are referenced using rid, we solved this by using this module since it exports your role definitions and maintain the assigned permissions which can be painful to achieve. Since your sites are "clones" this should work perfectly.

Even though what you want is to sync the table like so, perhaps you can opt for a database focused approach like described here and here depending on your server configuration.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.