Wondering if AffiliateWP works on a multisite setup? The answer is yes! AffiliateWP is fully compatible with WordPress Multisite and can be configured to share affiliate data across all network sites. This allows affiliates to promote products or services on any sub-site and earn commissions seamlessly.
In this guide, we’ll walk you through the setup process, share important considerations, and address common questions about using AffiliateWP on a multisite network.
Setting Up AffiliateWP on Multisite
To configure AffiliateWP for multisite use, follow these steps:
- Ensure your WordPress installation is set up as a multisite network. You can find details on enabling Multisite in WordPress’s official documentation.
- Add the following line to your
wp-config.php
file, preferably above the line/* That’s all, stop editing! Happy blogging. */
:define( 'AFFILIATE_WP_NETWORK_WIDE', true );
- Go to My Sites » Network Admin » Plugins and click Network Activate under the AffiliateWP plugin name. This ensures AffiliateWP is activated across all sub-sites in your network.
Once activated, AffiliateWP will appear in each sub-site’s WordPress admin area.
How AffiliateWP Works in a Multisite Setup
When AffiliateWP is network-enabled, it shares its database tables across all sub-sites, providing a unified affiliate system. Visits generated on any sub-site are visible on the AffiliateWP » Visits page for all sites. Similarly, referrals created on any sub-site appear on the AffiliateWP » Referrals page, giving a comprehensive view of activity across the network.
Affiliates who register on one sub-site automatically gain access to all sub-sites on the network. This means they can use their referral ID or username on URLs from any sub-site to earn commissions. Additionally, affiliates can log in to their Affiliate Area on any sub-site to view their statistics, referrals, and creatives. Promotional creatives uploaded by the site admin are also shared across all sub-sites, ensuring consistency in marketing materials.
It is worth noting that while affiliate accounts are shared, the WordPress user account created during affiliate registration is specific to the sub-site where the affiliate signed up. To sync WordPress user accounts across all sub-sites in the network, you can use plugins such as Multisite User Management or WP Multisite User Sync.
Settings for each sub-site are stored independently in the wp_options
table, allowing you to configure integrations, currencies, and other preferences differently for each sub-site. However, this also means you’ll need to enable your desired integrations individually on each sub-site to ensure referrals are generated correctly.
Considerations for Multisite Users
There are a few key points to keep in mind when using AffiliateWP on a multisite network. For networks using subdomains, such as site1.mydomain.com
and site2.mydomain.com
, enabling the Cookie Sharing option in the AffiliateWP » Settings » Advanced tab is essential. This setting ensures that affiliate tracking works seamlessly across subdomains.
If your network includes custom domain mappings, AffiliateWP will not be able to track referrals between sites with different root domains. Tracking is limited to sub-sites that share the same origin domain.
While it is possible to set different currencies on each sub-site, this approach is not recommended. All referrals are stored in a single table and displayed in the currency setting of the sub-site being viewed, which can lead to inconsistencies.
For networks requiring automatic license configuration, you can streamline the process by adding the license key to your wp-config.php
file. This ensures the key is pre-populated across all sub-sites, ready for activation.
Migrating AffiliateWP to Multisite
If you’re transitioning from a standalone AffiliateWP installation to a multisite network, it’s possible to retain all affiliate data. When you enable multisite, AffiliateWP creates new network-wide tables prefixed with affiliate_wp*
. To preserve your existing data, delete these new tables and rename the standalone site’s tables to match the affiliate_wp*
prefix. Refresh your database, and all affiliate data will now be shared across the network.
Frequently Asked Questions
Will referrals work across subdomains on the network?
Yes, but if your network uses subdomains (e.g., site1.mydomain.com
, site2.mydomain.com
), you’ll need to enable the Cookie Sharing option in AffiliateWP » Settings » Advanced to track users across subdomains.
Can AffiliateWP track custom domain sites on the network?
No, the network-wide tracking feature only works for sites that share the same origin domain (e.g., site1.mydomain.com
and site2.mydomain.com
). Custom domains are not supported.
What license is required to use AffiliateWP on a multisite network?
Each sub-site where AffiliateWP is activated requires a valid license activation. Network activation does not bypass license limits. For more details, visit the AffiliateWP pricing page.
How can I automatically configure the license key for all sub-sites?
Add the following line to your wp-config.php
file:
define( 'AFFILIATEWP_LICENSE_KEY', 'YOUR_LICENSE_KEY' )
;
Can affiliates register on one sub-site and use their account on others?
Yes, once an affiliate registers on any sub-site, their account is automatically available on all sub-sites in the network.
Can AffiliateWP track referrals across sub-sites with different themes?
Yes, AffiliateWP works independently of your site’s theme. Referrals and visits are tracked as long as the plugin is activated and configured correctly.
That’s it! AffiliateWP integrates seamlessly with WordPress Multisite, allowing affiliate data to be shared across all sub-sites while maintaining individual configurations for settings and integrations. With proper setup, affiliates can promote products or services across your network, providing a unified yet flexible affiliate marketing experience.