Plesk allows you to run different versions of PHP for different domains on the same server, ensuring compatibility for legacy apps while providing maximum speed for modern ones.
Changing the PHP Version
- Go to Websites & Domains and find your domain.
- Click on PHP Settings.
- At the very top, click the dropdown menu next to PHP version.
- Select the version you need (e.g., 8.2 or 8.3). It is always recommended to use the latest version your code supports for significantly better performance and security.
Adjusting PHP Directives (Memory Limit, Upload Size)
If you are trying to upload a large file to WordPress and getting an error, you likely need to increase your PHP limits. On the same PHP Settings page, scroll down to the "Performance and security settings".
- memory_limit: Increase this to
256Mor512Mif your application is crashing due to memory exhaustion. - post_max_size and upload_max_filesize: Increase both to allow larger uploads (e.g., from
2Mto64M). Note: post_max_size must be equal to or greater than upload_max_filesize.
Click Apply, and the new settings will take effect immediately without needing to restart the whole server!