# 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 ###
```


---

# Agent Instructions: 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://metabolism.gitbook.io/symfony-wordpress-bundle/getting-started/wordpress.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.
