Transferring a Craft License to a New Domain
Each Craft license may only be used on a single public domain at a time (see How Craft license enforcement works for more info).
Sometimes, you’ll need to transfer a license between disparate code bases. In this case, you’ll need to transplant the license key file. See the next section.
Most times, you merely need to associate the license from an existing code base with a new domain name. In that case, skip the next section.
Craft licenses are self-managed through our Craft Console service. Sign up for an account at console.craftcms.com.
Transplant a License File #
In this scenario, you have an old website with a Craft CMS code base; e.g., a web property you’d like to retire and use its license for a brand new Craft CMS instance. You’ll need to transplant the license.key
file.
- Copy the
config/license.key
file from the old code base into the new one - Delete files in the
storage/runtime/cache
directory in the new code base, or runphp craft clear-caches/all
The second step forces Craft to refresh its license info, which is cached for 24 hours (or whatever your cacheDuration
is set to)
In Craft 2, the directory structure was a bit different—the config
and storage
folders lived in a craft
folder.
You may see a notice at the top that the license belongs to another domain—this is to be expected, as a known key is being used on a new domain. In the next section, we'll show you how to associate the license with this new domain.
Transfer a License to a New Domain #
Log into your Craft Console account to associate your license with the new domain. Create an account if you don’t have one yet.
You will see a list of all the Pro or Solo licenses previously registered against your account.
Only the first ten characters of each key are shown in this list, but they should uniquely identify the license.
If you don’t see the license in your list go to Claim License and upload the license key. Unclaimed keys are immediately added to your account; keys already claimed by someone else will need to be released from their owner’s Craft Console account before you can claim it in yours.
Click on the key you'd like to assign to a new domain, then on Change Domain within the License Details panel. Enter the new domain, and click Save.
Now go back to your website’s Control Panel and refresh it. If the notice doesn’t go away, try clearing its cache.
Keep in mind that you may never see a mismatch notice in development or staging environments. Always assign the license to your live domain, and verify it once the key is deployed to that environment.