Support

Account

Home Forums ACF PRO Pro License Key in config?

Solved

Pro License Key in config?

  • +1 to make some noise.

    It is really time consuming that any member of my team and I constantly have to re-enter the keys on all our computers for local development and on every dev, stage and prod environment after every single sync of the database.

    • Luca R.

    • November 28, 2019 at 8:46 pm

    +1 again, about time for this issue to be solved.

  • @elliot Are there any plans to deal with this issue?

  • Just here for my regular biennial bump!

    This topic was started in 2014 and I’ve been following it since at least 2016. Every few years there’s been some noise indicating this was being worked on, but here we are in nearly 2020 and it’s still not resolved.

    Like many other developers I regularly deploy updates to development, staging and production environments for numerous sites with ACF Pro installed. Each time I run a database migration (via WP Migrate DB Pro) I have to manually reactivate ACF Pro. I have yet to encounter another premium plugin that behaves similarly.

    @elliot, I love ACF and owe you a huge debt of gratitude for the time and effort you’ve saved me over the years! That said, this has been a pain point for a long time. Is there any possibility of this making it onto the roadmap for 2020?

    • Fletch

    • December 12, 2019 at 1:05 am

    +1 (again). @elliot, we chatted a few years ago, and you were interested in doing this and possibly spoke with others (Delicious Brains, Gravity maybe?) in how they do things. Can you at least give us an update whether this is going to happen?

    We all love ACF Pro. We just lose countless hours due to this issue that we don’t have with any other pro plugin.

    • Fletch

    • December 12, 2019 at 1:07 am

    @nlenkowski can you send Elliot a support request regarding this? That’s how I got a hold of him a few years back.

  • +1 can’t understand why this is marked as solved

  • @fletch Not a bad idea. I’ll give it a few weeks and reach out to him directly.

    • endcore

    • February 12, 2020 at 6:23 pm

    +1 we need this!

  • +1 we need this!

    • JMay

    • February 18, 2020 at 11:41 am

    @nlenkowski Were you able to get that support request made? With the new Gravity-Forms-esque pricing tiers going into effect, it seems this is the perfect time to do something like this.

  • @jmay and @fletch I sent Elliot a support request via email on Feb 14 and heard back from him the next day.

    Elliot indicated he continues to be interested in implementing this feature, but needs to do additional research. His primary concern is license keys ending up accidentally checked into public GitHub repositories, a valid concern.

    He also said that once he’d made a decision on whether or not to implement this he’d reply directly on this topic.

    • Dalton

    • February 25, 2020 at 5:51 am

    wp-config.php already contains your database credentials, so I hope people aren’t checking that into public repos, but I guess you never know. Β―\_(ツ)_/Β―

    In my other (non-WP) applications, I use a .env file for sensitive info that doesn’t get checked into version control. I wish WP supported it natively, but here’s a quick tutorial on how to use it: https://m.dotdev.co/secure-your-wordpress-config-with-dotenv-d939fcb06e24

    Easy enough if you control the server and can use Composer, otherwise probably not an option.

    • philby

    • February 25, 2020 at 7:43 am

    While it is probably possible that some wp-config files might go public, it is a risk that premium plugins like Gravity Forms, WP Migrate DB Pro and Admin Columns Pro are willing to take, and have been for quite a while.

  • Mine own eyes have seen wp-config.php (as well as other sensitive credentials and API keys) checked into public repositories, unfortunately. It would be great if WP supported .env files natively, it’s definitely the proper place for config values. Too bad it’s not an option, it would likely alleviate this concern for many developers.

  • I don’t see the wp-config concern as enough of a reason to prevent this given how many other plugins and values such as DB credentials are already following that pattern.

    It would be great if WP supported .env files natively, it’s definitely the proper place for config values.

    Agreed. Until that is part of core, using https://github.com/vlucas/phpdotenv isn’t that much overhead as an included composer package. The roots.io team has a good write-up of how they’ve incorporated into their repo structures, build pipelines, etc. But chances are if wp-config has been committed with values to git, adding a composer dependency may be beyond the same user base :/

  • Hey – what’s up 2014 feature request? 😎
    +1 from me
    still seems like this would be super helpful to a lot of people.

    • ccnweb

    • June 2, 2021 at 5:17 pm

    Maybe a solution could be to use the acf_pro_update_license($key) function ? You can place it in a PHP script that you can call with the wp-cli if you want to do a centralized deployment of the license key across multiple websites. That’s what I plan to do for all our websites, I can notify the community here if it worked for me and some people are interested.

  • @ccnweb This feature request has been stalled for quite some time. If you put together a workable solution it would be great if you shared it here. A custom wp-cli command would do nicely!

  • Throw this in your MU plugins https://gist.github.com/petertwise/eeb7dea2531ad204a346e42faba0179a#file-acf_pro_license_constant-php
    and then add put this in your wp-config file:
    define('ACF_PRO_LICENSE', 'yourkeyhere' );

    That can be used manually, but I also use this bash script to make it easier to install. Note that the license key is not stored in the script:
    https://gist.github.com/petertwise/eeb7dea2531ad204a346e42faba0179a#file-acf-install-license

    Please use responsibly. Never ever allow your key to become public. Never include wp-config or any files including licenses and other secrets in any version control system.

    It’s also important to double check that you are following [WP best practices and setting wp-config.php permissions](https://wordpress.org/support/article/changing-file-permissions/#shared-hosting-with-suexec) to 440 or 400 when you’re not editing the file.

Viewing 20 posts - 76 through 95 (of 95 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.