# Wordpress

## Set up environment variables

Go to your project root and edit or create `.env.local`

```editorconfig
###> metabolism/wordpress-bundle ###
APP_ENV=dev
TABLE_PREFIX=wp_
DATABASE_URL=mysql://user:pwd@localhost:3306/dbname

AUTH_KEY=xxxxxxxxxxxxxxxxxxxxxx
SECURE_AUTH_KEY=xxxxxxxxxxxxxxxxxxxxxx
LOGGED_IN_KEY=xxxxxxxxxxxxxxxxxxxxxx
NONCE_KEY=xxxxxxxxxxxxxxxxxxxxxx
AUTH_SALT=xxxxxxxxxxxxxxxxxxxxxx
SECURE_AUTH_SALT=xxxxxxxxxxxxxxxxxxxxxx
LOGGED_IN_SALT=xxxxxxxxxxxxxxxxxxxxxx
NONCE_SALT=xxxxxxxxxxxxxxxxxxxxxx
###< metabolism/wordpress-bundle ###
```

{% hint style="info" %}
use <https://roots.io/salts.html> to generate salts
{% endhint %}

## Start the server

Configure a vhost mounted to `/public`, or start a [Symfony server](https://symfony.com/doc/current/setup/symfony_server.html)

## Install Wordpress

Load the [server url](https://127.0.0.1:8000) and follow the Wordpress installation procedure

![](https://2528877867-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZhdVRcuWfQoG77xbyM8p%2Fuploads%2FrW5aPsekCgqbuVihtkFB%2Finstall-step5_v47.png?alt=media\&token=bf2fd1e1-706d-4521-8360-25fc808f778e)

{% hint style="info" %}
**Post Install :** You will be asked to add `WP_INSTALLED=1` to the environment, this is required to perform loading optimisations
{% endhint %}

## Update gitignore

```gitignore
###> metabolism/wordpress-bundle ###
/public/uploads/*
!/public/uploads/acf-thumbnails
/public/edition
/public/cache
/public/wp-bundle
###< metabolism/wordpress-bundle ###
```
