# Symfony, Statamic, WordPress and PHP

> Deploy Symfony, Statamic, WordPress and plain PHP apps with Falak, including each preset's shared paths, deploy script and first-deploy steps.

Source: https://falak.sh/docs/deploy/php/

Besides Laravel, Falak has presets for Symfony, Statamic, WordPress and plain PHP. All of them run on FrankenPHP (default) or PHP-FPM, deploy with zero downtime, and use the same flow as [Deploy Laravel](/docs/deploy/laravel/). This page lists what differs.

## Common steps

1. Create the site from **+ Create → Git repository** and pick the preset (Falak suggests one when it detects the framework).
2. Pick servers (the first is the leader) and a domain.
3. Add variables (for example database references) under **Variables**.
4. Deploy.

## Presets

  
    | Setting | Value |
    |---|---|
    | Web directory | `public` |
    | Shared paths | `var/log/` (directory), `.env.local` (file) |
    | Initial variables | `APP_ENV=prod`, `APP_SECRET` |

    ```bash title="Deploy script"
    $FALAK_FETCH

    cd "$FALAK_RELEASE_DIR"
    $FALAK_PHP bin/console cache:clear --env=prod --no-debug
    if [ "$FALAK_IS_LEADER" = "1" ]; then
        $FALAK_PHP bin/console doctrine:migrations:migrate --no-interaction --allow-no-migration
    fi

    $FALAK_ACTIVATE
    $FALAK_RESTART_PROCS
    ```

    Symfony logs in `var/log` are collected by the agent. Add Messenger consumers as [workers](/docs/guides/processes/) with a custom command, for example `php8.4 bin/console messenger:consume async --time-limit=3600`.
  
  
    | Setting | Value |
    |---|---|
    | Web directory | `public` |
    | Shared paths | `storage/`, `.env`, `content/`, `users/`, `public/assets/` |
    | Initial variables | `APP_NAME`, `APP_ENV=production`, `APP_KEY`, `APP_DEBUG=false`, `APP_URL` |
    | Scheduler | On |

    The deploy script is Laravel's plus `$FALAK_PHP please stache:warm` before activation. Because `content/` and `users/` are shared, content edited in the Control Panel survives deployments.

    
    Shared paths are per server. With several servers, Control Panel edits on one server are not visible on the others. Use one server, or Statamic's Git integration.
    
  
  
    | Setting | Value |
    |---|---|
    | Web directory | repository root |
    | Shared paths | `wp-content/uploads/` (directory), `wp-config.php` (file) |

    ```bash title="Deploy script"
    $FALAK_FETCH

    $FALAK_ACTIVATE
    ```

    Create `wp-config.php` in the site's `shared/` directory on each server (for example through the [terminal](/docs/guides/terminal/)), or write it from environment variables in your repository's own `wp-config.php` and remove the shared path.

    For a WordPress install without your own repository, deploy the [WordPress template](/docs/templates/catalog/#wordpress) instead (Apache + MariaDB in Docker Compose).
  
  
    | Setting | Value |
    |---|---|
    | Web directory | `public` |
    | Shared paths | none |

    ```bash title="Deploy script"
    $FALAK_FETCH

    $FALAK_ACTIVATE
    $FALAK_RESTART_PROCS
    ```

    Requests that do not match a file are routed to `index.php` in the web directory. A `composer.json` is required for the native build to detect PHP.
  

## PHP versions and extensions

Servers install PHP 8.1–8.5 (default 8.4) with these extensions for every version: `bcmath`, `cli`, `curl`, `gd`, `igbinary`, `intl`, `mbstring`, `mysql`, `pgsql`, `readline`, `redis`, `soap`, `sqlite3`, `xml`, `zip`. Add PHP versions on the server page under **PHP**. See [Provisioning](/docs/servers/provisioning/).

## Next steps
