Skip to content
GPLWP Guides

How to run an affiliate program on WordPress

Marketing & Email Time About 45 minutes for the basic setup 6 steps Updated 23 Oct 2026

MARKETING & EMAIL
The short answer

WordPress has no built-in affiliate-program system. For a small programme, you can assign unique WooCommerce coupons and reconcile sales manually, but proper referral links, cookie tracking, commission approvals and lifetime customer attribution require an affiliate plugin or custom development.

The route
  1. 01Define the programme rules
  2. 02Use the manual route for a small programme
  3. 03Install an affiliate tracking system
  4. 04Create affiliate access and links
  5. 05Test the complete customer journey
  6. 06Review and pay commissions

What you need

  • A WordPress site with a checkout or membership system
  • Admin access to WordPress
  • A defined commission and payout policy
  • A test customer account and payment method

Define the programme rules

Decide who can join, what products or actions earn commission, the commission rate, the referral window, the payout schedule and what happens when an order is refunded. Put these rules on a public affiliate terms page before inviting partners.

Also decide whether you will use last-click or first-click attribution, whether affiliates may use paid advertising or brand terms, and whether self-referrals are prohibited. Do not leave these decisions to individual disputes after sales arrive.

Use the manual route for a small programme

If you have only a few trusted partners, create one unique WooCommerce coupon per affiliate and record the owner, rate, dates and paid orders in a spreadsheet. A coupon can credit a sale without the customer first clicking a referral link, which suits podcasts, printed material and social posts.

This route is genuinely workable for a small shop, but it does not give you reliable click attribution, browser-cookie tracking, automatic commission records, affiliate dashboards or lifetime customer links. You will also need to check refunds, cancelled orders and repeat purchases by hand. WooCommerce coupon-based tracking documentation confirms that assigning a coupon is what connects it to an affiliate.

Install an affiliate tracking system

For a programme with more than a few partners, install an affiliate plugin that integrates with your checkout. Connect the integration, create the affiliate registration or application page, and choose whether applications are approved automatically or manually.

Configure the default commission rate, referral cookie duration, attribution rule, excluded products, order statuses that create payable referrals and the payout method. Affiliate tracking normally stores referral information in the visitor’s browser and attaches it to the order when the customer checks out.

Create affiliate access and links

Publish the affiliate area where partners can register, log in, find their referral links and view visits, referrals and earnings. Approve each application before giving access to promotional materials, especially if you pay cash commissions or need to protect your brand.

Give each approved affiliate a clear link format and explain how to use campaign labels for separate email, social or website promotions. Offer assigned coupon codes as well if affiliates promote verbally or offline. An affiliate dashboard can be provided with a WordPress block or, where supported, an affiliate-area shortcode.

Test the complete customer journey

Open a private browsing window, click an affiliate link, confirm the visit or referral is recorded, place a real or test order, and check the commission amount and order status. Repeat the test with an affiliate coupon, a refund and a returning customer.

Test on the same browser and a different browser. Caching, CDN rules, JavaScript errors, ad blockers and changed referral parameters can stop cookies being set. The common Friday failure is a cached checkout or optimisation setting that lets visits appear to work while the order receives no affiliate credit. Exclude the affiliate cookies and relevant account pages from caching where necessary, then purge every cache before retesting.

Review and pay commissions

Review pending referrals against the order status, subtract refunded or cancelled orders according to your policy, and approve only commissions that are payable. Keep a record of payout date, amount, affiliate and payment reference. Make your payout threshold and payment method clear to affiliates.

Fast way: use AffiliateWP with the relevant checkout integration. It can track referral links and WooCommerce orders, support assigned coupon codes, set global or product-specific rates and provide an affiliate area. Add its Lifetime Commissions feature when an affiliate should earn on future purchases from a referred customer, even after the browser cookie is gone or the customer buys while logged out.

The fast route

Let AffiliateWP do it

Tracks referrals and lifetime commissions, making it suited to rewarding affiliates for every future purchase by a referred customer.

Get AffiliateWP

Sources

  1. woocommerce.com /document/affiliate-and-referral/how-to-track-affiliate-sale…
  2. woocommerce.com /document/affiliate-program-for-woocommerce/?utm_source=open…
  3. affiliatewp.com /docs/does-affiliatewp-work-with-caching/?utm_source=openai
  4. affiliatewp.com /docs/woocommerce/?utm_source=openai

Questions

Can I run an affiliate programme on WordPress without a plugin?
Yes, but only in a limited manual form. Give each partner a unique coupon code, export matching orders from your checkout and calculate commissions in a spreadsheet. This can suit a handful of trusted affiliates, but WordPress will not natively provide referral links, cookie attribution, approval workflows, affiliate dashboards or automatic lifetime commissions.
How are affiliate sales tracked on WordPress?
Affiliate sales are usually tracked by a referral link that stores an affiliate identifier in the visitor’s browser, then connects that identifier to a qualifying order. A coupon code can provide another attribution method. Tracking can fail when cookies are blocked, links use an outdated parameter, caching serves the wrong page or JavaScript errors stop the tracking script.
Should I use affiliate links, coupon codes or both?
Use both when your affiliates promote in different places. Referral links work well on websites, blogs and email campaigns, while assigned coupon codes work for podcasts, videos, printed promotions and customers who type a code directly. Decide which method wins if a customer uses a code after clicking another affiliate’s link, and document that rule.
How do I pay affiliates for repeat purchases?
Repeat-purchase commissions require customer-to-affiliate attribution, not just a short browser cookie. A plugin with lifetime commissions can link the customer to the affiliate using an account or email address and credit later orders. Without that feature, you must match repeat orders manually, and the result can fail when customers clear cookies, switch devices or check out as guests.
Why are affiliate referrals missing after checkout?
Missing referrals are commonly caused by disabled integration settings, expired or blocked cookies, caching, JavaScript errors, ad blockers, conflicting plugins or testing while already logged in as the affiliate. Check the visit log first, then inspect the browser cookies, referral URL, checkout order status and cache exclusions. Always run a clean test in a private window after changing settings.