Want to sell online courses with WordPress without buying a heavyweight LMS platform? In this tutorial we will show you how to configure your website to sell online courses using nothing but Restrict for WordPress and WooCommerce: WooCommerce handles the payments, and Restrict makes sure only paying customers can see your course content. Setting everything up is fast and easy, and requires no special knowledge beyond general familiarity with WordPress – the rest is simply following these instructions and adapting them to your specific scenario.
So, buckle up, here we go.
What you need to sell online courses with WordPress
We will be using two plugins for this:
- WooCommerce – install and activate the latest version (download it from WordPress.org).
- Restrict for WordPress – download it from your Restrict account. If you do not have a license yet, all plans are listed on the pricing page, each with a 7-day free trial.
Your course content itself can be anything WordPress can display – written lessons, videos, downloads, or a mix. You will simply place it on regular pages or posts and lock those down.
Step 1: Set up WooCommerce
Once WooCommerce is installed, make sure you have configured at least one payment gateway for selling your products. WooCommerce has dozens of payment gateway integrations (you can browse them here), so choose whichever suits your needs best. If you already have WooCommerce running with your preferred payment method configured, you can skip this step.
Next, head to WooCommerce Settings > Accounts & Privacy tab and make sure you have unchecked the option labeled Allow customers to place orders without an account. This is a very important step: for the whole setup to work, your customers must be registered on your website, because that is what will later allow them to log in and access your online courses.

Step 2: Create a product for each course
Now create a product in WooCommerce. This product acts as the entry ticket for your online course: buying it is what grants a customer access.
If you offer a single course, one product is enough. If you offer different courses at different prices, create multiple products with their own pricing – each one will grant customers access to a different course. With this done you are technically ready to start selling; but before selling anything, let’s create the course itself.
Step 3: Restrict your course content
Regardless of whether your course is written lessons, videos or anything else, you will place it as the content of a dedicated page or post. When you create that page or post, restrict its content to WooCommerce Users, select the Specific Product option, and then choose the exact product a customer must purchase to access the content.
In the screenshot below, a post titled Online Course has its content restricted to customers who purchased a WooCommerce product named My Online Course:

From this point on, only customers who are logged in to your website and have previously purchased that specific product can see the course. Any other visitor who opens the post sees no course content at all – just the restriction message, which we will improve next.
Step 4 (bonus): Turn the lockout message into a sales pitch
With everything set up as above, you are basically ready to go. But a few extra touches create a much better experience for your customers – and more sales for you.
Head to Restrict > WooCommerce tab, where you can specify the messages shown to customers who have not purchased the required product. Within the Specific product area, set up a message like:
In order to access this course, please purchase [rsc_woo_product_links]
The trick is the [rsc_woo_product_links] placeholder: it displays the required product’s title as a clickable link that takes the customer straight to the WooCommerce product page. The visitor instantly knows what to buy and is one click away from buying it – no hunting around your shop. The wording itself can be anything that fits your scenario.

Step 5 (bonus): Add a login form to the message
Another awesome improvement: let customers who already purchased log in right on the course page instead of being redirected around your website. To do this:
- Head to the Login Form area of Restrict and copy the login form shortcode (more about this feature in the login form documentation).
- Go back to the WooCommerce area of Restrict and paste the shortcode into the same message you defined for the specific product requirement.
It will look something like this:

As a result, returning customers can log in on that very page, and as soon as they do, the restricted course content is displayed to them. Sounds awesome, right?
Scaling up: restrict a whole category of lessons
One more thing worth remembering: Restrict lets you restrict an entire post category in a few clicks (see the category restriction documentation).

So if you have multiple lessons or courses sharing the same restriction criteria, simply put all those posts in one category and apply the restriction to the category itself, instead of configuring each post individually. Yep, it’s that simple.
Going further
There is a lot more you can do depending on your exact scenario, but the practices above will get you up and running with a few clicks and without much hassle. Two popular extensions of this setup:
- Time-limited access: sell course access that expires a set number of days after purchase – see time-based content restriction using Restrict and WooCommerce.
- Recurring subscriptions: keep access tied to an active, auto-renewing subscription with the WooCommerce Subscriptions add-on – see content restriction based on WooCommerce Subscriptions.
And if you would like to see this exact recipe applied to a real-life niche, check out our walkthrough on selling online yoga classes with Restrict and WooCommerce.