---
title: "PHP configuration"
url: https://docs.corefinity.com/guides/sites/software-and-services/php-settings-and-php-ini
type: guide
last_updated: 2026-11-13
feature: php-settings
related:
  - https://docs.corefinity.com/api/reference/runtime/update-php-runtime.md
  - https://docs.corefinity.com/api/reference/runtime/get-php-effective-configuration.md
  - https://docs.corefinity.com/api/reference/runtime/test-php-ini.md
  - https://docs.corefinity.com/api/reference/runtime/check-php-ini.md
  - https://docs.corefinity.com/api/reference/runtime/get-php-settings.md
  - https://docs.corefinity.com/api/reference/runtime/update-php-settings.md
  - https://docs.corefinity.com/mcp/tools/corestack_php_settings_get.md
  - https://docs.corefinity.com/mcp/tools/corestack_php_settings_update.md
  - https://docs.corefinity.com/mcp/tools/corestack_php_extensions_update.md
  - https://docs.corefinity.com/mcp/tools/corestack_php_directives_update.md
  - https://docs.corefinity.com/mcp/tools/corestack_php_fpm_update.md
  - https://docs.corefinity.com/mcp/tools/corestack_php_xdebug_set.md
---
# PHP configuration

Change a site's PHP limits, extensions and custom php.ini, and review every change before it applies.

## Before you start

- You can open the site in **Managed Websites**. Anyone who can open a site can change its PHP configuration.
- Each environment has its own configuration: choose **Production** or **Staging** in the site header first.

## Change a setting

1. **Open PHP configuration**

   Go to **Managed Websites**, choose the site, then **Software & services** under **Site settings**. Choose **Configure…** beside **PHP**.

   _Screenshot: The Services card of a site. The PHP row shows version 8.3 with the buttons Change… and Configure…._

2. **Change the value**

   Choose the **Settings** tab and change a value, such as **Memory limit**. The line under each field gives its range; the bar at the bottom counts your changes.

   _Screenshot: PHP configuration on the Settings tab. Memory limit is set to 768M, marked 768M in your changes, and the bar at the bottom reads 1 change beside Discard and Review and apply._

3. **Review and apply**

   Choose **Review and apply**, check the list, then choose **Apply**. One review applies the changes on every tab together.

   _Screenshot: The Review and apply dialog. Under Settings and PHP-FPM it lists memory_limit going from 512M to 768M, above Cancel and Apply._

The first change on an environment also turns on instant changes. After that, a change applies live and the site keeps running; if it cannot be applied, the previous settings are put back.

## What each tab holds

| Tab            | What you change                                                                                                                         |
| -------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| **Extensions** | Switch PHP extensions on or off. A locked extension says what needs it.                                                                 |
| **Settings**   | Limits, errors, sessions, OPcache, APCu and PHP-FPM processes. **Apply preset** fills the form with values suggested for your platform. |
| **php.ini**    | Your own directives, loaded after the other tabs.                                                                                       |
| **Tools**      | The command-line tools on the site, with their versions and paths. Read only.                                                           |

**Max execution time** is 60, 120 or 300 seconds: longer work belongs in a scheduled task. See [Scheduled tasks](/guides/sites/site-settings/scheduled-tasks).

## Add a custom php.ini

1. **Start the file**

   Choose the **php.ini** tab, then **Start from an example** or **Write my own**. An example is inserted as comments: remove the `;` from the lines you want.

   _Screenshot: The php.ini tab with the Examples list open. It offers WooCommerce large imports, Debug a staging environment and Wordfence WAF, each with an Insert button._

2. **Check and apply**

   Problems are listed under the editor as you type. Choose **Review and apply**, then **Apply**.

The file holds up to 32 KiB. Lines the platform manages are refused with the reason, among them extensions, `disable_functions`, `open_basedir` and `display_errors` on production.

**Effective values** shows what PHP ends up with for the web and the command line.

> **Tip:** **History** in the dialog's **…** menu lists every revision and restores an earlier one. **Apply to other environments…** copies the configuration to the site's other environments.

## Automate this

**API:** [Update memory, upload and execution limits](https://docs.corefinity.com/api/reference/runtime/update-php-settings.md), scope `write`

```bash
curl -X PUT https://manage.corefinity.com/api/corestack/sites/1042/php-settings \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "max_execution_time_seconds": 120,
    "memory_limit_bytes": 536870912,
    "upload_max_filesize_bytes": 268435456,
    "version": 12
  }'
```

**MCP:** [`corestack_php_settings_update`](https://docs.corefinity.com/mcp/tools/corestack_php_settings_update.md), scope `write`

```json
{
  "name": "corestack_php_settings_update",
  "arguments": {
    "site_id": 4211,
    "version": 3,
    "memory_limit_bytes": 805306368,
    "upload_max_filesize_bytes": 67108864,
    "max_execution_time_seconds": 120
  }
}
```

**Control Panel:** Managed Websites › your site › Site settings › Software & services ([https://manage.corefinity.com/go/php-settings](https://manage.corefinity.com/go/php-settings))

## Related

- [Change PHP version](/guides/sites/software-and-services/php-version): Switch a site to another PHP version.
- [Logs](/guides/sites/logs-and-monitoring/logs): Read and narrow a site's logs.
- [Scheduled tasks](/guides/sites/site-settings/scheduled-tasks): Run a command on a schedule.
