# PHP versions and default limits

> Which PHP versions Ruachost hosting offers, which version new accounts use, and the default PHP limits such as memory_limit and upload size.

Source: https://helpcenter.ruachost.com/developers/php/php-versions-and-default-limits/

## PHP versions

| | |
| --- | --- |
| **Versions available** | 5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3, 8.4 and 8.5 |
| **Default for new accounts** | PHP 8.2 |
| **Recommended** | The newest version your website supports. PHP 8.2 to 8.4 suits WordPress and most modern apps. |
| **How many versions at once** | One version for your whole account, including addon domains and subdomains |
| **Web server** | LiteSpeed |

Change your version in cPanel under **Software → Select PHP Version**. See [Changing your PHP version and settings](https://helpcenter.ruachost.com/cpanel/software/changing-php-versions-and-settings-using-php-selector/).

> **Caution:**
PHP versions older than 8.1 no longer get security updates from the PHP project. We keep them so old scripts can still run, but we recommend upgrading your site.

## Default PHP limits

You can change all of these yourself in **Select PHP Version → Options**.

| Setting | Default | Highest you can choose |
| --- | --- | --- |
| `memory_limit` | 512 MB | 2 GB |
| `upload_max_filesize` | 512 MB | 2 GB |
| `post_max_size` | 512 MB | 2 GB |
| `max_execution_time` | 60 seconds | Any value |
| `max_input_time` | 600 seconds | Any value |
| `max_input_vars` | 10000 | Any value |
| `date.timezone` | UTC | Any time zone, e.g. `Africa/Lagos` |
| `display_errors` | Off | |
| `log_errors` | On | |
| `allow_url_fopen` | On | |

PHP settings can't go beyond your plan's resources. For example, a script can't use 2 GB of memory if your plan has less RAM. See [PHP memory limit vs your plan's RAM](https://helpcenter.ruachost.com/developers/php/resolving-the-allowed-memory-size-exhausted-php-error-message/).

## Extensions and caching

- **Extensions:** over 100 PHP extensions are available, including `imagick`, `intl`, `redis`, `memcached`, `ioncube_loader` and `sourceguardian`. Turn them on in **Select PHP Version → Extensions**.
- **OPcache** speeds up PHP and is available on every version. See [Enabling PHP opcode caching](https://helpcenter.ruachost.com/developers/php/enabling-php-opcode-caching/).
- **Redis and Memcached** are available in cPanel for object caching. See [Enabling the Redis extension for PHP](https://helpcenter.ruachost.com/apps/guides/enabling-the-redis-extension-for-php/).

## Security

Every account runs in its own isolated environment (CloudLinux CageFS), and PHP files are scanned for malware in real time. On shared hosting, a few PHP features may be restricted to protect the server and other customers. If your app needs a function that's blocked, [open a support ticket](https://dashboard.ruachost.com/submitticket.php) and tell us which one.

Need full control of PHP, including your own `php.ini` and several PHP versions side by side? A [Managed VPS](https://ruachost.com/vps) gives you your own server.
