Skip to content
Pages in Guides

PHP frameworks

Laravel, Symfony, WordPress and other PHP applications, served by PHP-FPM behind nginx or Apache.

Guide Updated View as Markdown

Part of Deploying by framework.

PHP applications are detected by a composer.json with a front controller, or an index.php at the root; Noust runs one PHP-FPM pool per application on its own socket, runs composer install when there is a composer.json, finds public/ (or the web root you give), and writes a fastcgi site (nginx only). The PHP version is the one in composer.json (require.php) or runtime: php@8.3.

Laravel

Shell
noust create -d shop.example.com -s https://github.com/you/shop.git --persist storage
  • --persist storage keeps storage/ (logs, uploads, the cache) across releases instead of losing it with each new release directory.

  • .env is generated from .env.example, with random values for the secrets; read the application's Environment page after the first deploy and check that APP_KEY and the database settings are what the application needs.

  • Migrations are a hook, run before the new release serves:

    YAML
    hooks:
      pre_deploy:
        - run: php artisan migrate --force
          migrates: true

    migrates: true makes Noust record that the deployment changed the schema, and ask before going back past it (releases.md).

  • A database for the app, with its connection string written into .env: noust db provision shop.example.com -e mysql (or --database mysql at noust create).

Symfony

Same as Laravel: public/ is the web root, var/ is what to persist (--persist var), and the migration is a hook (php bin/console doctrine:migrations:migrate --no-interaction). Set APP_ENV=prod in the environment.

WordPress and other PHP applications

WordPress, with its MariaDB, is in the catalog: noust recipe install wordpress -d blog.example.com (recipes.md). Any other PHP application with a front controller deploys like Laravel.

Something on this page is wrong or unclear? Report it on GitHub.

Help, contributing and the project’s policies are under Project.

Search the documentation

Type to search every page.

↑ ↓ to move, Enter to open, Esc to close