# Settings

## Introduction

In the Settings page you can manage your site's details, its PHP version and PHP settings, web
directory, vhost template, basic auth, and more.

## Site details

The Settings page shows read-only details for the site, including its ID, domain, type, repository,
path, status, and creation date. Several of these have inline controls to change them, described
below.

## Change PHP Version

You can change the PHP version of each website in their Settings page.

Make sure that the PHP version you want to use is already installed in the [PHP](../servers/php#install-and-uninstall)
page.

## Configure PHP Settings

For PHP sites you can tune common per-site PHP runtime limits without editing any files. Click
**Configure** next to the PHP version on the Settings page to set:

- **Max upload size** — the largest file that can be uploaded (MB).
- **Max execution time** — how long a request may run (seconds).
- **Memory limit** — the maximum memory a request may use (MB).
- **Max input vars** — the maximum number of input variables, e.g. form fields.

Leave a field empty to use the server's default. Vito applies these to the site's vhost (via FastCGI
`PHP_VALUE`, together with `client_max_body_size`/`fastcgi_read_timeout` on nginx and `request_body`
on Caddy), so they take effect for requests served through nginx/Caddy and are preserved across
deployments. They do not affect the PHP CLI.

Where a value is left unset, the server default applies. PHP defaults to 2 MB uploads, a 30s
execution time, a 128 MB memory limit, and 1000 input vars; on nginx, requests are additionally
capped at 1 MB (body size) and 60s until you raise them here.

:::tip
These settings are per-site. PHP-FPM process pools are shared per system user, so process-manager
tuning (such as `pm.max_children`) is not configured here.
:::

:::warning
Configuration is available only for PHP sites that use automatic vhost generation and the default
vhost template. If you use a custom vhost template, add the directives to your template manually — a
banner warns you when stored PHP settings cannot be applied.
:::

## Change branch

You can change the branch of your cloned repository in the Settings page.

## Change source control

You can change the source control of your cloned repository in the Settings page.

## Web directory

You can change the web (public) directory of your site relative to its root path, for example
`/public` for a Laravel application. Updating it regenerates the vhost.

## Aliases

Site aliases are no longer managed here. In v4.x they are handled as alias
[domains](/docs/4.x/sites/domains), where you can add multiple alias and redirect domains per site,
each with its own DNS validation and SSL configuration.

## VHost

In v4.x the vhost is generated from a [Mustache](https://mustache.github.io) template, replacing the
custom-block model used in earlier versions. The Settings page gives you two related controls.

### View VHost

**View VHost** opens a read-only view of the vhost that is currently deployed to the server, so you
can see exactly what Vito generated.

### VHost Template

**Edit Template** opens the Mustache template used to generate the vhost. From here you can:

- **Edit** the template with syntax highlighting for your webserver (nginx or Caddy).
- **Preview** the generated output from your edits before saving, without touching the live config.
- **Reset** the template back to the default, which regenerates the vhost and discards your
  customizations.

Changes to the template persist across SSL, domain, and redirect updates. When a site uses a
customized template, the Settings page flags it so you know it differs from the default.

:::tip
See the [Mustache manual](https://mustache.github.io/mustache.5.html) for the template syntax.
:::

### VHost generation

Automatic vhost generation can be enabled or disabled per site. While it is disabled, changes to
SSL, domains, or redirects will not update the vhost on the server.

:::warning
On sites that existed before upgrading to v4.x, vhost generation is **disabled by default** so the
upgrade does not overwrite a working configuration. Review the template, then re-enable generation
(a banner on the site provides a quick **Re-enable** action). See
[Custom VHost Configuration](/docs/4.x/prologue/breaking-changes) for details.
:::

## Basic Auth

For sites served by nginx or Caddy, you can protect the site with HTTP Basic Authentication, adding
one or more username/password pairs. This is useful for staging and preview sites that must be
publicly reachable but not openly accessible. Basic auth is managed from the Settings page and shows
whether it is currently enabled and how many users are configured.

## Force SSL

Once a site has an active SSL certificate, you can enable **Force SSL** to redirect all HTTP traffic
to HTTPS. Toggle it from the Settings page. See the site's
[Domains](/docs/4.x/sites/domains#ssl-per-domain) page (per-domain certificates) or the server's
[SSL Certificates](/docs/4.x/servers/ssl) page (wildcard/custom certificates) for how to issue a
certificate first.

## Site Statistics

On servers that have the log analysis (GoAccess) service installed, you can enable **Statistics** for
a site to collect and visualize its web traffic. Enabling it configures log collection for the site;
disabling it stops collection. See [Monitoring](/docs/4.x/servers/monitoring) for the server-side
service.

## Delete

You can delete the website from your server.

This will delete the files of your website and the webserver configurations related to your website
from the server.
