# 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 %}
