---
title: wpe apps create
description: Create a new WP Engine Headless Application
url: https://developers.wpengine.com/docs/headless-platform/reference/cli/wpe/apps/create/
image: https://developers.wpengine.com/og/docs/headless-platform/reference/cli/wpe/apps/create.png
---

# wpe apps create

## Description

Create a new WP Engine Headless Application

## Usage

Terminal window

```bash
$ wpe apps create [OPTIONS]
```

## Extended Description

The `wpe apps create` command allows you to create a new WP Engine Headless Application. You provide: The GitHub repository you want to use. The environments you want to deploy. The name of your app. Running the command will deploy the code from your repository to the corresponding environments.

The `repository` is a reference to your GitHub repository. For example, if your GitHub repository is `https://github.com/organization/myapp`, then the value your use for `repository` will be `organization/myapp`.

The `environments` correspond to the WP Engine User Portal environments where you have your WP site. So if your domain is `myapp.wpengine.com`, your environment would be `myapp`.

## Options

```
--environments, -e  Environments in JSON format (use with -n, -r flags; surround value with single quotation marks)
--filepath, -f      Path to file with JSON of the app to create (use without -e, -n, -r flags)
--help, -h          Help for create
--name, -n          Assign a name to the app (optional use with -e, -r flags)
--repo, -r          GitHub repo associated with the app (use with -e, -n flags)
```

## Examples

### Create With A wpe.json File

The simplest way to create your new app is by configuring a `wpe.json` file with the variables necessary to deploy the application. Something like the following:

```json
{
  "name": "myapp",
  "repo": "organization/myapp",
  "region": "US-C",
  "environments": [
    {
      "name": "Production",
      "branch": "main",
      "wp_environment_name": "YOUR WordPress environment name",
      "domains": ["yourdomain.com"],
      "env_variables": [
        {
          "key": "WORDPRESS_URL",
          "value": "https://yoururl"
        }
      ]
    }
  ]
}
```

With the above file created, you can deploy your app with a single command:

Terminal window

```bash
$ wpe apps create -f wpe.json
```

Providing custom `domains` is optional. If you do want to connect a custom domain, you need to configure your domain one of 2 ways.

- Root CNAME pointed to `js.wpenginepowered.com`

- A records with the following IPs:

  - `141.193.213.10`
  - `141.193.213.11`

> **Note**
>
> We currently only support one custom domain.

### Create From a zip file

> **Note**
>
> The zip app flow only works with wpe CLI version 1.0.0 or greater.

If you don’t use a GitHub repository host (i.e. you use BitBucket or GitLab), you can create a Headless Platform app from a `json` file configured for zip uploads. All requirements from the standard `wpe create` flow apply, with a few exceptions.

To make your `json` file zip configurable, set the `"repo"` parameter to `"uploadable"`. Then, add a parameter named `"zip_file_path"` with the directory path to your zip file. You must include the `"branch:"` parameter, with a value of `"-"`.

```json
{
  "name": "your_app_name",
  "repo": "uploadable",
  "region": "EU-W",
  "environments": [
    {
      "domains": [],
      "name": "someenvname",
      "zip_file_path": "path/to/file.zip",
      "branch": "-",
      "wp_environment_name": "wpinstancename",
      "env_variables": [
        {
          "key": "replace-with-key",
          "value": "replace-with-key-value"
        }
      ]
    }
  ]
}
```

With your `json` file parameters set, run `wpe apps create -f wpe.json`.

##

## Was this helpful?

Thanks for the feedback!

```json
{"@context":"https://schema.org","@graph":[{"@type":"WebSite","@id":"https://developers.wpengine.com/#website","name":"WP Engine Product Documentation","url":"https://developers.wpengine.com/","description":"Resources for developing, deploying, and scaling on WP Engine.","inLanguage":"en-US","keywords":["API documentation","product documentation","headless WordPress","managed WordPress hosting"],"publisher":{"@id":"https://wpengine.com/#organization"}}]}
```
