Change the PHP Version and PHP Settings (memory_limit, upload_max)

Updated: 4 December 20264 min read24 viewsMarkdown

Picking the PHP version your software needs and adjusting limits such as memory and upload size takes a few minutes. On Voligen cPanel hosting you do it with CloudLinux's PHP selector, without touching the server itself.

Version selection list and setting sliders
Version first, then options.

Before you start

  • Check which PHP versions your software (WordPress, theme, plugins, shop software) supports.
  • Take a backup before a big version jump (see our cPanel backup guide).
  • Changes apply account-wide within seconds; no server restart is needed.

Change the PHP version

  1. In cPanel, open Select PHP Version in the Software section.
  2. Pick a version from the Current PHP version drop-down at the top. The option marked native is the server default.
  3. The choice saves automatically. On the same screen you can tick the extensions your software needs, such as intl, imagick or zip.
Three steps: choosing from the version list, setting sliders, save button
1: Choose the version, 2: set limits under Options, 3: save and test your site.
Note

If cPanel also shows MultiPHP Manager, the two tools can interfere with each other. On CloudLinux servers we recommend managing PHP in one place: Select PHP Version.

Change PHP settings (limits)

Open the Options tab on the Select PHP Version page. Choosing a new value from the drop-down next to a setting saves it. The settings changed most often:

SettingWhat it doesTypical need
memory_limitMemory one PHP process may use256M is common for WordPress/WooCommerce
upload_max_filesizeLargest single file you can uploadRaise it for themes or large media
post_max_sizeTotal size of one form submissionMust be equal to or larger than upload_max_filesize
max_execution_timeSeconds a script may runRaise it for import and backup plugins
max_input_varsNumber of fields one form may send3000+ for large menus and page builders
Warning

Raising memory_limit does not raise your plan's total RAM. The account's total memory is capped by the CloudLinux limit. Very high values can hide a problem and make concurrent processes hit the limit.

Verify the change

To confirm the setting applies, create a temporary file in public_html:

<?php phpinfo();

Save it as info.php, open https://example.com/info.php and check the version and values. Delete the file when you are done, because it shows server details to anyone. In WordPress, Tools > Site Health > Info shows the same data safely.

Troubleshooting

SymptomLikely causeFix
500 error after switching versionsSoftware not compatible with the new versionSwitch back, then update plugins and themes.
"Allowed memory size exhausted"memory_limit too lowRaise it one step; if it persists, find the heavy plugin.
phpinfo still shows the old valueA line in .htaccess or .user.ini overrides itRemove the php_value lines from those files.
"The uploaded file exceeds upload_max_filesize"Upload limit too lowRaise upload_max_filesize and post_max_size together.

Frequently asked questions

Which PHP version should I choose?

The newest version your software supports. Newer versions are faster and still receive security updates.

Can each domain use a different PHP version?

Select PHP Version applies to the whole account. If you need a different version per folder, ask our support team.

Can I use a php.ini file instead?

You can, but managing settings in one place lowers the risk of mistakes. We recommend the Options tab.

Does changing the PHP version affect my email or databases?

No. The PHP version only decides how your website code runs. Mailboxes, databases and files stay as they are, and if something breaks you can switch back in seconds.

If something goes wrong, open a ticket from the client area. For LiteSpeed and CloudLinux plans, see Linux hosting.

Was this article helpful?
Thank you for your feedback.