1. Home
  2. Documentation
  3. Migration
  4. Migrating from Easy Digital Downloads to Freemius

Migrating from Easy Digital Downloads to Freemius

Selling your WordPress plugin or theme using Freemius and EDD as is will force you to maintain two code-base versions since each platform uses its own software licensing and updates mechanism. This could turn into a serious hassle, and that’s exactly what this plugin will help you to avoid.

Getting Started

This migration tool will help you to adjust your plugin or theme to work directly with the Freemius licensing and software updates engine, while grandfathering an EDD license, and reducing the heavy load from your servers.

For example, if during your product’s lifetime you sold 10,000 single-site licenses that were all activated, even if most of them have expired, your EDD server will get about 10,000 hits a day just to check the validity of the license and potentially show that there’s a newer version of your product. If you sold multi-site or agency licenses, your server will get even more hits, based on the number of active sites running with your digital product.

How Does It Work? (Architecture)

This plugin works as a LAZY migration tool. It will only migrate a license with all of its data once a site upgrades to your latest plugin or theme version, which includes the special migration snippet to Freemius. Once a site is migrated with its license to Freemius, all successive API requests will work directly with the Freemius API/server, and will incrementally reduce the load from your servers.

Before you rush into migration, please read the following sections to make sure your EDD store structure as well as product type and pricing are supported by the migration tool.

Supported Digital Products

  • WordPress Plugins / Add-ons / Extensions

  • WordPress Themes

Freemius does not support migration of physical products.

Supported Business Models

  • Freemium

  • Premium

You can use Freemius Insights as a standalone product to gather valuable insights in your free plugins and themes, but there’s no point in migrating data from your EDD Store for those free products.

Supported EDD Add-Ons

The current migration plugin version supports migration from Easy Digital Downloads with any combination of the following EDD add-ons:

  1. Software Licensing

  2. Recurring Payments

  3. VAT Extension

  4. Stripe Payment Gateway

  5. PayPal Payment Gateway

  6. PayPal Payments Advanced

  7. PayPal Pro and PayPal Express

  8. Authorize.net Payment Gateway

  9. Braintree

Multi Plan Products Migration Support

EDD employs the concept of variable prices where you can configure multiple prices for the same download. Most developers use the variable prices feature to set different license activation limits. For example, $50 for a Single Site License and $100 for a 5-Site License. This scenario is fully covered by the migration tool.

If you sell a digital product with entirely different plans, where each plan contains a different set of features – a manual mapping of the EDD variable price IDs to the Freemius plans is required. This is due to the fact that EDD doesn’t support the concept of a “plan” and therefore, the migration plugin won’t know what variable price to associate with which plan. If that’s the case with your plugin or theme, please contact us via support@freemius.com and we’ll help you set it up.

Coming Soon (not yet supported)

Since we get these questions a lot, it’s important to mention that the following features are part of our roadmap, but are still not fully supported.

Affiliation System

We currently do not support affiliation links, so if your revenue stream relies heavily on affiliates, please don’t migrate yet. Having said that, you can use our coupons as a workaround. Simply set up a unique coupon code for each affiliate. That way you’ll be able to track all upgrades associated with any specific affiliate.

Membership Subscriptions

Some businesses offer an “all you can eat” club membership where subscribed customers can download and use any of the store’s products. It is possible to set up a “membership plugin” with Freemius and use it as a reference for the licensing mechanism in all of your store’s digital products, but, it’s not something that we currently support out-of-the-box and the migration plugin will not be able to migrate memberships from EDD.

If you sell memberships as an access to your WordPress plugins or themes, please contact us via support@freemius.com for further information.

Bundles

EDD offers selling of bundles. Since EDD generates a separate license per product in the bundle, the migration tool will migrate product licenses that were generated as part of a bundle purchase correctly. Having said that, selling bundles with Freemius is not something that we currently support out-of-the-box. Much like with the membership, it’s possible to set up a “bundle plugin” with Freemius and use it as a reference for the licensing mechanism in the bundled products.

Currencies

The migration currently assumes all payments are in USD (U.S Dollars). If you’d like to migrate from EDD to Freemius with another currency, please contact us via support@freemius.com

Migration Plugin Setup

Requirements

PHP 5.3 or higher (we are using spl_autoload_register())

EDD 2.5 or higher

WordPress 4.0 or higher (the min required version by EDD)

Installation

Download the latest Freemius EDD Migration plugin version.

Upload and activate the plugin on your EDD Store.

TIP: We highly recommend first testing it on your development or staging environment before moving to production.

After plugin activation, you’ll be automatically redirected to the migration settings page. If for some reason it isn’t, the settings page is located under Downloads -> Freemius.

Now it’s time to connect your EDD Store to your account on Freemius.

Login to your Freemius Dashboard and go to your profile page.

TIP: If you still don’t have an account, you can register here for free.

Scroll to the bottom of your profile page and copy the ID, public key and secret key to the corresponding fields in the plugin settings page.

Click on Save Settings.

If the credentials were copied correctly, the page will reload with a list of all your EDD downloads.

Now, simply click on Sync to Freemius next to the product that you’d like to migrate to Freemius.

If you have never created the product on Freemius before, it will automatically be created with the same pricing that is set on your EDD Store.

To verify the product and its pricing were successfully migrated to Freemius, refresh your Freemius Dashboard and you should be able to see the product on the modules menu.

If you already created the migrating product on Freemius before with an identical slug, the syncing method will only enrich the pricing on Freemius. It will not modify the existing pricing. For example, let’s assume that My Awesome Plugin has the following variable prices configured on EDD:

License Price
Single Site License $79.99 / year
Up to 5 Sites License $199.99 / year

And the following pricing on Freemius:

License Price
Single Site License $49.99 / year
Unlimited Sites License $499.99 / year

After clicking the sync button, the pricing on Freemius will update to:

License Price
Single Site License $49.99 / year
Up to 5 Sites License $199.99 / year
Unlimited Sites License $499.99 / year

As you can see, the single site licenses didn’t change because it was already set. And the 5-sites license was added.

Adding Migration Code to Your WordPress Plugin or Theme

Requirements

Before adding the migration code to your module, make sure you completed integrating the Freemius WordPress SDK by following the instructions in the SDK INTEGRATION tab in the Freemius Dashboard.

Integration

  • In the plugin’s folder you’ll find a directory named /client-migration/ – please copy it to your plugin.
  • This directory includes all of the client migration files that you’ll need to include from your plugin’s main PHP file, or your theme’s functions.php file. You can do that by adding the following code right after the code that initiates your Freemius instance:
require_once dirname( __FILE__ ) . '/path/to/client-migration/edd.php';
  • Open /client-migration/edd.php and make the following adjustments:
    a) Update the name of My_EDD_License_Key to your own unique class name, and be sure to replace it throughout that file. For example, if your product’s name is “Awesome Product” then you can rename the class to class Awesome_Product_EDD_License_Key.
    b) Update the getter and setter accessors (get() and set() functions) to load and store your product’s license key.
    c) Update the function name my_freemius() to the shortcode function that was uniquely generated for your plugin or theme.
    d) Replace 'https://your-edd-store.com' with your EDD store URL.
    e) Replace '1234' with your product’s EDD download ID.

Tip: If you are migrating multiple products, it would probably make more sense to create a factory class to dynamically generate FS_Client_License_Abstract classes instances per product.

FAQ

What gateways are currently supported by the migration tool?

All EDD gateways are supported, including Stripe, PayPal and manual purchase.

After setting up the migration plugin, will I need to email my EDD customers with the new Freemius license keys?

Nope. Luckily EDD’s license keys are 32 characters long, just like Freemius keys, and the migration plugin preserves the keys. So no need to email customers with any new keys.

Will the subscriptions migrate to Freemius?

The subscription data and corresponding license details will migrate to Freemius, but the subscriptions themselves will not. Payment gateways do not allow moving subscriptions between accounts, hence, there’s no way for us to migrate subscriptions from gateways like Stripe to our Stripe.

Will Freemius take care of the EU VAT after the migration?

All EU VAT associated with purchases and subscriptions processed through Freemius will automatically be handled by Freemius. Subscription renewals that were originally processed with EDD remain your responsibility, since they were processed by your gateways.

What is the benefit of using Freemius Checkout to sell from your EDD Store?

As you probably know, WordPress is a very powerful CMS. Unfortunately, it consumes a LOT of server resources and it’s a widely popular target for hackers. Selling products from a WordPress powered store relies heavily on the user’s session, and using caching plugins like WP Super Cache or WP Rocket becomes super tricky since you can’t cache eCommerce related pages.

Delegating your checkout and eCommerce logic to external service like Freemius Checkout will enable you to widely activate a caching plugin, effectively turning your storefront into a static and more secure HTML website. Combining Freemius Checkout with a free caching plugin like WP Super Cache and a free CDN service like CloudFlare will enable you to use one cheap server without ever needing to scale your infrastructure!

How can a user that made a purchase on Freemius access the EDD membership page?

The simplest way to implement an access to your membership area for users who purchased a plugin via Freemius is to implement a login with a license key instead of a password.

Will the migration code slow down my EDD store?

For the long run – it will only make your store way faster! By getting rid of the license verification and product updates load, which will be delegated over to Freemius after every successful migration.

Obviously, another plugin in the stack means more code processing. Like with any other WordPress plugin that exposes a public API endpoint, the plugin will check the HTTP request path on every page load, looking for a match to the endpoint’s URL. This logic is very light and doesn’t consume any meaningful resources.

If there’s no match, the plugin doesn’t add any additional load and stops execution.

When there is a match, the plugin will start a migration process of the license which might take up to 10 seconds since there are a few back and forths between your EDD store and the Freemius backend. Since it’s a valid API migration request and probably runs in a separate server thread, it shouldn’t affect your storefront.

Will the migration code slow down the client’s site?

There won’t be any slow downs. Upon plugin or theme update to the new release with the Freemius migration code, if a license migration is required, the client’s code will trigger the migration in a separate, non-blocking request.