Title: Set license key through code
Last modified: June 12, 2020

---

# Set license key through code

 *  Resolved [daanvosdewael](https://wordpress.org/support/users/daanvosdewael/)
 * (@daanvosdewael)
 * [6 years ago](https://wordpress.org/support/topic/set-license-key-through-code/)
 * Hi,
 * Is it possible to set the license key through code with something like this:
 * `define('OPTIMUS_KEY', '*insert license key*')`
 * We use Bedrock for our WordPress sites and all our license keys are in an `.env`
   file. This makes deploying a breeze. Now with Optimus we have to manually enter
   the license key through the WP admin.
 * Thanks!

Viewing 1 replies (of 1 total)

 *  Anonymous User 16850768
 * (@anonymized-16850768)
 * [5 years, 12 months ago](https://wordpress.org/support/topic/set-license-key-through-code/#post-12988881)
 * To receive support for the premium version of Optimus we ask that you [contact](https://www.keycdn.com/contact)
   us directly because support for commercial products is not [supported in this forum](https://wordpress.org/support/guidelines/#do-not-post-about-commercial-products).
 * We’re looking forward to assisting you further.

Viewing 1 replies (of 1 total)

The topic ‘Set license key through code’ is closed to new replies.

 * ![](https://ps.w.org/optimus/assets/icon-256x256.png?rev=976959)
 * [Optimus - WordPress Image Optimizer](https://wordpress.org/plugins/optimus/)
 * [Support Threads](https://wordpress.org/support/plugin/optimus/)
 * [Active Topics](https://wordpress.org/support/plugin/optimus/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/optimus/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/optimus/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: Anonymous User 16850768
 * Last activity: [5 years, 12 months ago](https://wordpress.org/support/topic/set-license-key-through-code/#post-12988881)
 * Status: resolved