> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sandywp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PHP settings

> Switch PHP versions and tune supported php.ini settings for a ready SandyWP sandbox.

PHP settings let you change a sandbox's runtime without editing configuration files by hand. Open **Site settings**, then select **PHP configuration** once the sandbox is `ready`.

<img src="https://mintcdn.com/sandy-wp/QrIaogrIPttSMHEN/images/docs/php-config.png?fit=max&auto=format&n=QrIaogrIPttSMHEN&q=85&s=09a862dfae31e23441fea4548a93caae" alt="The PHP configuration panel on the sandbox detail page" width="1748" height="1311" data-path="images/docs/php-config.png" />

## Switch PHP versions

Choose PHP 8.1, 8.2, or 8.3 from the version selector. Switching restarts the sandbox for a few seconds, but leaves its files and database unchanged.

## Tune php.ini values

Save all required changes together. SandyWP restarts the sandbox briefly to apply them.

| Setting                 |     Default | Allowed range  |
| ----------------------- | ----------: | -------------- |
| Max execution time      |       300 s | 10–300 s       |
| Max input time          |       300 s | 10–300 s       |
| Max input vars          |       1,000 | 100–10,000     |
| Memory limit            |      256 MB | 64–512 MB      |
| Post max size           |      256 MB | 8–5,120 MB     |
| Upload max filesize     |      256 MB | 2–5,120 MB     |
| Session GC max lifetime |     1,440 s | 300–86,400 s   |
| Output buffering        | 4,096 bytes | 0–65,536 bytes |

You can also toggle `allow_url_fopen`. The upload limit cannot exceed the post-size limit, and the memory limit is capped below the sandbox container limit.

Use the [File Manager](/guides/file-manager) to pair PHP changes with code edits, or create the stack you need from the beginning with [Create a sandbox](/guides/create-a-sandbox).
