Customizing a Local Site's Settings

Philip Newcomer edited this page Jan 14, 2018 · 4 revisions

All site-specific settings are defined in a config.yml file placed in the site's root directory (alongside the htdocs directory). This is a YAML file.

The following settings can be changed:

  • default_php_version: The site-specific default PHP version. Will use the global default if not defined here.
  • type: The type of site (laravel, php, proxy or wordpress). Normally this parameter is auto-detected and should not need to be changed, but you can set it here if you need to.
  • hosts: The hosts that should resolve to this local site. Note that this is an array, so format accordingly. You can add as many hosts as needed, for instance for a WordPress multisite install with multiple subsites. Note that wildcard characters are not supported; all entries need to be valid hosts file entries.
  • proxy_port: For proxy type sites, determines the host port where requests should be proxied to.
  • wp_uploads_proxy_url: If you want your local WordPress uploads directory to be proxied to a live site for files that do not exist locally, set the live site's URL here.

Here is an example config.yml file for a WordPress multisite with multiple hosts and uploads proxied from a live site:

type: wordpress
default_php_version: 7.1

Note that it is not required that there be a config.yml file present in a site's root directory. If none is present, the type of site (Laravel, WordPress, etc.) will be auto-detected from the files that are present, and the correct Nginx configuration used. The site directory + .dev will be used as the domain name; i.e. the directory testsite will result in the domain name You only need to create a config.yml if you wish to add additional hosts, use a WP uploads proxy, or override the auto-detected site type.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.