# Installation

{% hint style="info" %}
Make sure Composer is installed globally, as explained in the [installation chapter](https://getcomposer.org/doc/00-intro.md) of the Composer documentation.
{% endhint %}

## Creating a new project

```shell-session
$ composer create-project metabolism/wordpress-skeleton my_project_directory
```

## Or setting up an existing Symfony project

### Define installation paths for Wordpress

Go to your project root and edit the composer.json file :

```json
"minimum-stability": "dev",
...
"extra": {
    "installer-paths": {
        "public/wp-bundle/mu-plugins/{$name}/": ["type:wordpress-muplugin"],
        "public/wp-bundle/plugins/{$name}/": ["type:wordpress-plugin"],
        "public/wp-bundle/themes/{$name}/": ["type:wordpress-theme"],
        "public/edition/": ["type:wordpress-core"]
    }
}

```

### Install the bundle

```shell-session
$ composer require metabolism/wordpress-bundle
```

{% hint style="info" %}
**For applications that don't use Symfony Flex** : Enable the bundle by adding it to the list of registered bundles in the config/bundles.php file of your project

`Metabolism\WordpressBundle\WordpressBundle::class => ['all' => true],`
{% endhint %}


---

# 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/installation.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.
