Moodle WordPress SSO: Single Login for Both Sites

JUSTADDWATER > CourseTransit Guides > Moodle WordPress SSO: Single Login for Both Sites
Moodle WordPress SSO: Single Login for Both Sites

Moodle WordPress SSO: Single Login for Both Sites

Moodle WordPress SSO (single sign-on) lets a learner log in once on your WordPress site and land in their Moodle course already signed in. No second username, no second password, no “I can’t log in” emails after every sale.

Key takeaways

  • Moodle WordPress SSO means learners log in once, on WordPress, and are signed into Moodle automatically.
  • Without SSO, learners manage two passwords and you answer the support emails.
  • Options range from OAuth 2 setups you configure yourself to plugins that handle it for you.
  • In CourseTransit Pro, SSO is a single setting once WordPress and Moodle are connected.

This guide explains how it works, the main ways to set it up, and how CourseTransit Pro handles it.

Why SSO matters when you sell courses

When you sell through WordPress and teach in Moodle, every learner has two places to log in. Without SSO, the journey after purchase looks like this: buy on WordPress, receive an email with Moodle details, find the Moodle site, log in again, and reset a password when it does not work.

Each step loses some people, and the ones who get stuck email you. With SSO, the learner clicks Open course on your site and is in.

How Moodle WordPress single sign-on works

Both sites need to agree on who the learner is. In practice:

  1. The learner logs in to WordPress.
  2. When they open a course, WordPress asks Moodle to sign them in, passing a short-lived, signed proof of who they are.
  3. Moodle checks the proof, matches it to the learner’s Moodle account and starts a session.

The learner still has a Moodle account, because Moodle stores their enrolments, progress and grades. SSO only removes the second login.

Two things most setups miss

Logging out. Most developers build the sign-in and forget the sign-out. Ending the session is just as important as starting one. If a learner logs out of WordPress but their Moodle session stays open, the next person on that computer can open Moodle as them. On shared or office computers, that is a real risk. Logging out of one site should log the learner out of both.

One login page. Pick one primary login page, usually WordPress, and always send learners there. Then hide the other one or redirect it. In Moodle, the Alternate login URL setting (Site administration > Plugins > Authentication > Manage authentication) sends anyone who reaches the Moodle login page to your WordPress login instead. Two different login pages confuse learners when they come back, and browsers save passwords against the wrong page. Keep a way for admins to get in if WordPress is down, such as resetting the setting from the server.

Ways to set it up

Approach How it works Good for
OAuth 2 / OpenID Connect Moodle’s OAuth 2 services trust WordPress (running an OAuth server plugin) as the login provider Teams comfortable configuring identity settings on both sites
Identity provider for both Both sites trust a third system, such as Microsoft Entra ID or Google Organisations that already have company logins
Integration plugin The plugin that connects WordPress and Moodle also handles the sign-in Course sellers who want it to work without identity configuration

The first two are flexible but need careful setup and testing, and they do not know anything about your WooCommerce orders. If you already use a plugin to sell Moodle courses, using its SSO is usually simplest.

SSO in CourseTransit Pro

Once CourseTransit connects your WordPress and Moodle sites, single sign-on is one setting.

  1. Go to CourseTransit > Settings > SSO.
  2. Turn on Enable Moodle SSO.
  3. Click Save Settings.
CourseTransit Moodle SSO setting
Settings > SSO: one switch to sign learners into Moodle

From then on, learners who open a course from your WordPress site are signed into Moodle automatically. The enrolment created at purchase and the sign-in use the same account, so there is nothing to match up by hand. Logging out works the same way: when a learner logs out of WordPress, CourseTransit ends their Moodle session too.

SSO is part of CourseTransit Pro, alongside bundles, bulk seat purchase and automatic course sync. See how to sell Moodle courses with WooCommerce for the full setup.

Test it properly

Before you tell customers, test with a fresh account:

  1. Buy a course as a new customer.
  2. Open the course from the WordPress site and confirm you land in Moodle signed in.
  3. Log out of WordPress, then open Moodle in the same browser. You should be signed out there too.
  4. Repeat from a private browser window.
  5. Try an existing learner who already had a Moodle account before you turned SSO on.

If something fails, Settings > Logs in CourseTransit records connection and sign-in errors.

Security basics

  • Use HTTPS on both sites. SSO should never run over plain HTTP.
  • Keep both sites on supported, updated versions of WordPress, Moodle and the plugins involved.
  • Restrict who can change SSO settings to administrators.
  • If learners also need company logins through Microsoft or Google, see Moodle SSO with Azure AD, Google and SAML.

Frequently asked questions

Single sign-on between WordPress and Moodle lets a learner log in once, usually on the WordPress site, and move into Moodle without logging in again. Both sites recognise the same person.
Yes. Each learner still has a Moodle account, because Moodle stores their enrolments, progress and grades. SSO only removes the second login step.
Single sign-on is part of CourseTransit Pro. The free version covers connecting the sites, syncing courses, selling and enrolment.
Yes. Company-wide sign-in through Microsoft Entra ID, Google or SAML is a separate setup on the Moodle side, and it can sit alongside WordPress SSO. We cover it in our guide to Moodle SSO with Azure AD, Google and SAML.

Sell your Moodle courses from WordPress

CourseTransit syncs Moodle courses into WooCommerce and enrols buyers automatically. The free version covers syncing, selling and enrolment.

See CourseTransit

About the author: Himanshu Saini

Founder of JustAddWater and Moodle LMS architect. 13+ years building and supporting Moodle and IOMAD learning platforms, and AI integrations.

Related guides

With 13+ years of web development experience, I'm a full-stack developer & LMS expert specializing in LMS, eLearning, and training platform development. I’ve architected scalable learning systems, custom plugins, integrations, and enterprise-grade automation for organizations of all sizes. My background includes delivering large, complex projects for Fortune 500 companies across automotive, global energy, and healthcare sectors.

Start with a scoping conversation

Tell us about your learner base and what your current platform can’t do. We’ll come back with a straight answer on cost, timeline, and fit.

    Useful to know: integrations you need, whether deployment must be on-premise, and any audit or accreditation date you are working toward.

    We reply within one working day. No sequence, no drip campaign, no sales development rep.

    What happens next

    We reply with questions, not a brochure. Usually two or three, aimed at working out whether this is worth your time.

    You get the licence maths. What you pay now against what an owned platform costs once, with the assumptions shown.

    Then a scoped proposal. Fixed price and fixed timeline for the base package, or a scope document for larger builds.

    1,500
    Per-seat licences removed for one client
    30 days
    Base package to go-live

    "The engagement eliminated recurring per-user LMS licensing costs and gave the client full control over the roadmap, features, and integrations. JustAddWater responded quickly and efficiently despite the time difference. Their flexibility and strong communication were commendable."

    Nathan · CareRx
    Source: Clutch.co

    Start with a scoping conversation

    Tell us about your learner base and what your current platform can’t do. We’ll come back with a straight answer on cost, timeline, and fit.

      Useful to know: integrations you need, whether deployment must be on-premise, and any audit or accreditation date you are working toward.

      We reply within one working day. No sequence, no drip campaign, no sales development rep.

      What happens next

      We reply with questions, not a brochure. Usually two or three, aimed at working out whether this is worth your time.

      You get the licence maths. What you pay now against what an owned platform costs once, with the assumptions shown.

      Then a scoped proposal. Fixed price and fixed timeline for the base package, or a scope document for larger builds.

      1,500
      Per-seat licences removed for one client
      30 days
      Base package to go-live

      "The engagement eliminated recurring per-user LMS licensing costs and gave the client full control over the roadmap, features, and integrations. JustAddWater responded quickly and efficiently despite the time difference. Their flexibility and strong communication were commendable."

      Nathan · CareRx
      Source: Clutch.co