Skip to content


You can configure PHP via environment variables that listed at


Composer package hirak/prestissimo:^0.3 installed globally for www-data user to download dependencies in parallel.


PHP container comes with pre-installed drush and drush launcher. Drush launcher will help you use drush that comes with your project without specifying the full path to it.

You can execute drush commands remotely via drush aliases. Download drush aliases from Profile > Misc > Drush aliases page and place them to ~/.drush. Execute commands (replace [tokens] with the real values) like this:

$  drush @[organization].[application].[instance] [drush command]

Drupal Console

PHP container comes with installed drupal console launcher (not the same as drupal console), the launcher used to be able run drupal console without specified the full path to it. Please note that starting Drupal Console ~1.0 you have to install it manually (via composer) per project.

Environment variables

In addition to global environment variables, we provide the following variables in PHP container that you can use in your post-deployment scripts:

Variable Description
$APP_ROOT /var/www/html by default
$HTTP_ROOT e.g. /var/www/html/web
$WODBY_DIR_CONF /var/www/conf by default
$DRUPAL_SITE Drupal site directory, e.g. default
$WODBY_HOSTS [ "", "", "" ]


Some environment variables used by PHP may be overriden in wodby.settings.php file

Deprecated variables:

Variable Instead use

Variables availability

Environment variables provided by Wodby are always available in PHP even if PHP_FPM_CLEAR_ENV set to no.


Follow these steps to debug your application instance remotely with xdebug:

  1. Enable xdebug for your instance from [Instance] > Stack > Settings
  2. Set up forwarding for xdebug: copy Xdebug SSH tunnel command from [Instance] > Stack > PHP and run on your local machine
  3. Make sure you have your IDE xdebug listener running on port 9000
  4. Start debugging in IDE
  5. Start your browser debug helper plugin (Chrome or Firefox) and open the page you want to debug


If you need to make a redirect from one domain to another you can do it by customizing configuration files of nginx or by adding the snippets below to your settings.php file.

Redirect from one domain to another:

if (isset($_SERVER['WODBY_ENVIRONMENT_TYPE']) && $_SERVER['WODBY_ENVIRONMENT_TYPE'] == 'prod' && php_sapi_name() != "cli") {
    if ($_SERVER['HTTP_HOST'] == '') {
      header('HTTP/1.0 301 Moved Permanently');
      header('Location:' . $_SERVER['REQUEST_URI']);

Redirect from multiple domains:

if (isset($_SERVER['WODBY_ENVIRONMENT_TYPE']) && $_SERVER['WODBY_ENVIRONMENT_TYPE'] == 'prod' && php_sapi_name() != "cli") {
    $redirect_from = array(

    if (in_array($_SERVER['HTTP_HOST'], $redirect_from)) {
      header('HTTP/1.0 301 Moved Permanently');
      header('Location:' . $_SERVER['REQUEST_URI']);

Redirect from HTTP to HTTPS can be enabled on a domain edit page from the dashboard.