> For the complete documentation index, see [llms.txt](https://docs.navigaglobal.com/everyware/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.navigaglobal.com/everyware/everyware-starter-kit/environment-variables.md).

# Environment Variables

## **OC variables**

In some functionality there needs to be a general Open Content user that has access to all content of the project OC. An example of this functionality is the *404-redirect* that lets us match urls that cause a 404 to migrated articles and redirect the user to the new url.

* **OC\_URL** - Only the domain should be used e.g. *oc-public-imid.tryout.infomaker.io*
* **OC\_PORT** - use port 8080
* **OC\_USER** - a user with read access to all content
* **OC\_PASSWORD** - password

## App variables

There are som more general variables configure the application.

* **APP\_ORGANISATION** - Will be used to setup the customers [Project plugin](/everyware/mu-plugins/everyware-project-plugin.md). This means that the menu item will be named after this variable.
* **APP\_DEBUG** - Will set the entire application in debug mode.&#x20;
* **APP\_ENV -** Will set the state of your environment (local, testing, stage, prod)
* **APP\_DOMAIN** - Will set the `DOMAIN_CURRENT_SITE` constant in *www/wp-config.php.* Read more [here](https://wordpress.org/support/article/create-a-network/#step-4-enabling-the-network)
* **APP\_DEV\_DOMAIN** - Only used locally. Will act as default for the **APP\_DOMAIN** variable.

## Database variables

The database variables is used to setup the Wordpress database in *www/wp-config.php.*

* **DB\_NAME -** The name of the database for WordPress
* **DB\_USER -** MySQL database username
* **DB\_PASSWORD -** MySQL database password
* **DB\_HOST -** MySQL hostname

### **Available variables that should not be set unless good reason:**

* **DB\_CHARSET -** MySQL charset. Read [here](https://wordpress.org/support/article/editing-wp-config-php/#database-character-set)
* **DB\_COLLATE -** MySQL database collation (i.e. the sort order of the character set). Read [here](https://wordpress.org/support/article/editing-wp-config-php/#database-collation)
* **DB\_TABLE\_PREFIX -** is the value placed in the front of your database tables. Read [here](https://wordpress.org/support/article/editing-wp-config-php/#table_prefix)

{% hint style="info" %}
Read more about the Wordpress database constants [here](https://wordpress.org/support/article/editing-wp-config-php/#configure-database-settings)
{% endhint %}

## Cloudfront variables

Everyware projects use Cloudfront for certain services and there are variables that defines those domains.

* **CF\_IMENGINE** - The Imengine url.
* **CF\_PDF** - The PDF CDN url.
* **CF\_STATIC** - The projects assets CDN e.g. "static domain"

## Redis variables

Everyware projects uses the [Redis Cache Plugin](https://wordpress.org/plugins/redis-cache) and it is configured through variables.

* **REDIS\_OB\_DEBUG -** Disable graceful failures and throw exceptions.
* **REDIS\_OB\_DISABLED -** Disable the object cache.
* **REDIS\_OB\_HOST -** IP or hostname of the target server.
* **REDIS\_OB\_MAX\_TTL -** Set max time-to-live (in seconds) for cache keys with an expiration time of 0.
* **REDIS\_OB\_PORT -** TCP/IP port of the target server.
* **REDIS\_OB\_PREFIX -** Set the prefix for all cache keys.

{% hint style="info" %}
Further information about configuration can be found [here](https://github.com/rhubarbgroup/redis-cache/wiki/)
{% endhint %}

## Front Cache variables

* **FRONT\_CACHE\_TTL** - Set max time-to-live (in seconds) for front cache keys&#x20;

## AWS IAM variables / credentials

StarterKit comes with [WP Offload Media Lite Plugin](https://wordpress.org/plugins/amazon-s3-and-cloudfront/) that automatically copies images, videos, documents, and any other media added through WordPress’ media uploader to [Amazon S3](http://aws.amazon.com/s3/). In order to configure this, we need an IAM user.

* **AWS\_ACCESS\_KEY\_ID** - The access key from the IAM-user.&#x20;
* **AWS\_SECRET\_KEY** - The secret access key from the IAM-user.

{% hint style="info" %}
These variables are maintained by the Naviga hosting team
{% endhint %}

### **AWS SES variables**

StarterKit comes with [WP Offload SES Plugin](https://wordpress.org/plugins/wp-ses/) to connect the sites to [Amazon SES](https://aws.amazon.com/ses/).

* **AWS\_SES\_ACCESS\_KEY\_ID** - The access key from the IAM-user. (Default: `AWS_ACCESS_KEY_ID`)
* **AWS\_SES\_SECRET\_KEY** - The secret access key from the IAM-user. (Default: `AWS_SECRET_KEY`)
* **AWS\_SES\_FROM** - Changes the default email address used by WordPress
* **AWS\_SES\_RETURNPATH** - Sets the "Return-Path" header used by Amazon SES.
* **AWS\_SES\_REPLYTO** - Sets the "Reply-To" header for all outgoing emails
* **AWS\_SES\_ENDPOINT** - Amazon SES region

{% hint style="info" %}
These variables are maintained by the Naviga hosting team
{% endhint %}

## Local Environment

These variables can be setup on a local environment as well. You will automatically get two env-files:

* **.env** - is used to configure the local environment.
* **.env.example** - is used to generate **.env** for new developers to the project. It will be versioned in the repository.

{% code title=".env" %}

```bash
# OC
#OC_URL=
#OC_PORT=
#OC_USER=
#OC_PASSWORD=

# APP
APP_ORGANISATION="Everyware Starter Kit"
APP_DEBUG=true
APP_ENV=local
APP_DEV_DOMAIN=everywarestarterkit.local

# DATABASE
DB_NAME=everyware
DB_USER=admin
DB_PASSWORD=EveryWare
DB_HOST=mysql

# CLOUDFRONT
#CF_PDF=
#CF_STATIC=
#CF_IMENGINE=

# REDIS CONFIGURATION
#REDIS_OB_DEBUG=
#REDIS_OB_DISABLED=
#REDIS_OB_HOST=
#REDIS_OB_MAX_TTL=
#REDIS_OB_PORT=
#REDIS_OB_PREFIX=

# LEDGE FRONT CACHE
FRONT_CACHE_TTL=300

# AWS SES IAM
#AWS_SES_ACCESS_KEY=
#AWS_SES_SECRET_KEY=

# AWS SES SETTINGS
#AWS_SES_FROM=
#AWS_SES_RETURNPATH=
#AWS_SES_ENDPOINT=
#AWS_SES_REPLYTO=

# AWS IAM
#AWS_ACCESS_KEY_ID=
#AWS_SECRET_KEY=
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.navigaglobal.com/everyware/everyware-starter-kit/environment-variables.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
