Replacing a Registered Composer License

Approved License

When you install a Composer package that requires authentication, the license credentials (username and license key) are stored permanently on your system. While this is convenient, it can make upgrading your license a bit tricky later on — since Composer won’t prompt you again for new credentials.

But don’t worry — in this guide, we’ll walk you through how to update or replace the stored license for a Composer package.

Where Composer Stores Licenses

Composer saves license credentials in a global configuration file called auth.json. This file is stored in a system-specific location depending on your OS, which can be a bit tricky to find manually.

Fortunately, you don’t need to dig into that file. Composer provides a simple command to update the stored credentials globally.

Replace License via Command

To replace the existing license with a new one, run the following command:

composer config -g http-basic.package-name.hexters.com username license_key

Example:

composer config -g http-basic.package-name.hexters.com 44786536 69d5b9d7-2323-4496-a799-8dc3bc550a88

This command sets the new credentials globally, so you don’t need to run it inside your project folder. Composer will now use the updated license key for any future install or update requests related to that package.

When to Use This

This method is useful when:

  • You’ve upgraded your license
  • You’ve transferred ownership
  • You want to replace an expired or revoked key

Related Article

Renew License

What Happens When a License Expires? If the license you…
Leave a Reply

Your email address will not be published. Required fields are marked *

You can use the Markdown in the comment form.
    We hope our tools and source code make your development faster — and your work more enjoyable.
    © 2025 Hexters. All rights reserved.