Plesk lets you change the PHP version and configuration for each domain individually. This is useful when your website or application requires a specific PHP version, or when you need to adjust settings like memory limit, upload size, or execution time. This guide covers both tasks.

### Changing the PHP Version for a Domain

1. Log in to **Plesk**.
2. Go to **Websites & Domains**.
3. Click the domain name you want to configure.
4. Go to **Hosting & DNS** → **PHP Settings**.
5. In the **PHP version** dropdown, select the desired PHP version (e.g., 8.1, 8.2, 8.3).
6. Click **Apply** or **OK**.

### Common PHP Settings to Adjust

On the same **PHP Settings** page, you can modify configuration directives:

- **memory\_limit:** Maximum memory a PHP script can use (e.g., `256M` or `512M`). Increase if your site shows memory errors.
- **max\_execution\_time:** Maximum time a PHP script can run (e.g., `300` seconds). Increase for slow operations like large file imports.
- **upload\_max\_filesize:** Maximum file upload size (e.g., `64M`). Increase if you need to upload large files.
- **post\_max\_size:** Maximum size of POST data (should be larger than `upload_max_filesize`).
- **max\_input\_vars:** Maximum number of input variables (increase if forms with many fields are being truncated).
- **display\_errors:** Set to **Off** for production sites to avoid exposing sensitive information.
- **opcache.enable:** Set to **On** for better PHP performance.
- **disable\_functions:** List of disabled PHP functions. Leave empty unless your provider has specific requirements.

### Changing PHP Settings

1. On the **PHP Settings** page, find the setting you want to change.
2. Modify the value in the text field.
3. Click **Apply** to save.

### Setting a Default PHP Version for All New Domains

This option is available to administrators and resellers:

1. Go to **Tools & Settings** → **General Settings** (or **PHP Settings**).
2. Select the default PHP version.
3. Click **OK**.

### Important Notes

- PHP version changes take effect immediately. If your site shows errors after changing the version, switch back to the previous version.
- Some applications (especially older ones) may not be compatible with the latest PHP version. Check compatibility before upgrading.
- The available PHP versions depend on what your hosting provider has installed on the server.
- PHP settings changes only affect the specific domain, not all domains on the server.

### Troubleshooting

**Website shows 500 error after changing PHP version:**

- Switch back to the previous PHP version immediately.
- Check your application compatibility with the new PHP version.

**Cannot find the PHP version dropdown:**

- Your hosting provider may restrict PHP version changes. Contact support.

**Upload size is still too small after changing settings:**

- Ensure both `upload_max_filesize` and `post_max_size` are increased.
- Restart the website by toggling PHP handler off and on if changes do not take effect.

### Related Guides

- [Change the PHP version](/hc/help/en/articles/how-to-change-the-php-version-for-a-domain-in-plesk)
- [For a WordPress site](/hc/help/en/articles/how-to-install-wordpress-using-wp-toolkit-in-plesk)
- [Tune it for Laravel](/hc/help/en/articles/how-to-install-a-laravel-application-in-plesk)