# PHP versions and settings
Source: https://docs.webgee.com/en/wordpress-cloud/php-settings













PHP is configured per website, not per account, so two sites in the same
organisation can run different versions. Applies to all WordPress Cloud
packages.

Open a website and go to **Advanced** → **Developer tools**.

## Change the PHP version [#change-the-php-version]

<img alt="The Developer tools PHP panel, showing the version selector and built-in extensions" src="__img0" />

<img alt="The PHP version list, marking the latest release and the LTS versions" src="__img1" />

Versions run from the current release back through several older ones, with the
newest marked **LATEST** and the supported ones marked **LTS**.

<Callout type="warn">
  New websites are provisioned on **PHP 8.1**, which no longer receives security
  updates. Move to an **LTS** version unless something you run genuinely
  requires 8.1. Change it on a
  [staging copy](/en/wordpress-cloud/staging-sites) first — a version jump is
  the most common cause of a white screen after an otherwise routine change.
</Callout>

**Restart**, top right, restarts the PHP container. Changes to the version or to
`php.ini` need it before they take effect.

## Extensions [#extensions]

Beneath the version selector, the panel lists the **built-in extensions**
compiled into the version you are running — `curl`, `gd`, `imagick`, `intl`,
`mbstring`, `pdo` and the rest. Built-in extensions are always on and cannot be
switched off.

If a plugin reports a missing extension, check this list first. If it is present
and the plugin still complains, the problem is usually the PHP version rather
than the extension.

## php.ini directives [#phpini-directives]

<img alt="The php.ini editor, listing the directives set for this website" src="__img2" />

**Add directive** sets a value in the site's `php.ini`. A new site carries one:
`opcache.enable` set to `1`.

Common ones for WordPress:

```ini
memory_limit = 256M
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
```

Raise `upload_max_filesize` and `post_max_size` together — the second must be at
least as large as the first, or uploads fail without a useful message.

Restart the PHP container afterwards.

## Opcode caching [#opcode-caching]

Go to **Advanced** → **Optimisation**.

<img alt="The Optimisation panel with the opcode caching toggle" src="__img3" />

Opcode caching stores the compiled form of your PHP scripts so they are not
recompiled on every request. It is **on** by default and should stay on.

Turn it off only while you are actively editing PHP on the server and want your
changes visible without a restart. Turn it back on afterwards — leaving it off
on a live site costs real performance.

## IonCube loader [#ioncube-loader]

<img alt="The cron jobs and IonCube loader panels" src="__img4" />

IonCube runs commercially encoded PHP — some paid themes and plugins ship this
way. It is off by default; enable it only if something you run requires it.

It cannot be enabled on sites running PHP 8.0.

## Verify [#verify]

After changing the version:

* The site loads and `wp-admin` works.
* **Tools** → **Site Health** in WordPress reports no PHP version or extension
  warnings.
* Any page that generates PDFs, resizes images or talks to a payment gateway
  still works — these depend on extensions most directly.

## Related [#related]

* [Redis object caching](/en/wordpress-cloud/redis-object-cache)
* [Cron jobs](/en/wordpress-cloud/cron-jobs)
* [The WordPress Toolkit](/en/wordpress-cloud/wordpress-toolkit)
