How to create, update, and delete config vars in the Heroku app?

There are several ways in which we can create, update, and delete the config cars inside our Heroku dyno. Here are two beginner-friendly ways that can help you.

1 min read

Config vars change the way your app behaves. In addition to creating your own, some add-ons come with their own. Config var values are persistent–they remain in place across deploys and app restarts. Unless you need to change a value, you only need to set it once. There are several ways in which we can create, update, and delete the config cars inside our Heroku dyno.  Here are two beginner-friendly ways that can help you.

Using the Heroku CLI

We can change the config vars of an app using the command line. To perform this operation you should have Heroku CLI installed on your machine.

View current config vars value

$ heroku config
=== APP_NAME Config Vars
USER_ROLE:    admin
WEBSITE_NAME: thelovekesh

Set a config var

$ heroku config:set WEBSITE_NAME=thelovekesh 
Setting WEBSITE_NAME and restarting ⬢ APP_NAME... done, v3
WEBSITE_NAME: thelovekesh

Remove a config var

$ heroku config:unset WEBSITE_NAME=thelovekesh
Unsetting WEBSITE_NAME=thelovekesh and restarting ⬢ APP_NAME... done, v3

Using the Heroku dashboard

To change config vars of an app from the dashboard follow these steps

1. log in to Heroku.com

2. Choose the app inside the dashboard

3. Go to the settings

4. Scroll down and click on Revel Config Vars

Revel Config Vars Button
Revel Config Vars Button in Heroku Dashboard

After clicking the button you will see a prompt like an image. From there you can add, update and delete config vars.

Config Vars of an app
Config Vars of an app in Heroku Dashboard
Featured Hosting

Free hosting options for your first website

In this article, you will see the six best and free options to host and show your website on the internet.

3 min read

How to update the latest Ghost V4 on Heroku

Update your ghost blog to the latest version 4 on Heroku. Ghost blog has rolled out many new features in this version and speed is also optimized.

1 min read