Each website on your hosting account can run its own PHP version, and you can adjust PHP settings such as the memory limit or maximum upload size yourself. You'd usually do this when a plugin or theme asks for a newer PHP version, or when uploads or imports fail because a limit is too low.

Before you start

  • Take a backup, or make sure you know how to restore one, before changing PHP versions on a live site. Older plugins and themes can break on newer PHP versions. See Restore files, databases or email from a backup.
  • If you run WordPress, update WordPress, your plugins and your theme first. That fixes most compatibility problems before they happen.

Change the PHP version

  1. Log in to cPanel from your service page under Services → My Services (https://www.hooplahosting.co.nz/client/clientarea.php?action=services).
  2. Open MultiPHP Manager (type PHP in the cPanel search bar).
  3. Tick the domain you want to change.
  4. Choose the version from the PHP Version drop-down and click Apply.

The change takes effect straight away. Open your website and check a few pages, plus the admin area. If anything breaks, switch back the same way.

We recommend the newest version your site supports. Older PHP versions no longer get security fixes. For the versions we offer, see Which PHP versions do you support?

Change PHP settings

  1. In cPanel, open MultiPHP INI Editor.
  2. On the Basic Mode tab, choose your domain from the Select a location drop-down. Choose Home Directory instead to apply the settings to every site on the account.
  3. Change the settings you need (see the list below).
  4. Click Apply at the bottom.

The settings most often changed:

  • memory_limit: how much memory one PHP script can use. 256M or 512M suits most WordPress and WooCommerce sites.
  • upload_max_filesize: the biggest file you can upload through your website, for example 128M.
  • post_max_size: the biggest form submission allowed. Set it the same as, or a little larger than, upload_max_filesize.
  • max_execution_time: how many seconds a script can run before it's stopped. 300 helps with imports and backups.
  • max_input_vars: how many fields a form can send. Raise it to 3000 or 5000 if large menus or page-builder pages won't save fully.
  • display_errors: leave this Disabled on a live site. Errors are still written to your error log.

For settings that aren't in Basic Mode, use the Editor Mode tab, choose the location, add a line such as max_input_time = 300, and click Save.

Your hosting plan also has an overall memory limit. Setting memory_limit higher than your plan allows won't give your site more memory. See What are resource limits?

Check which settings are active

To confirm a change has applied, WordPress shows the PHP version and key limits under Tools → Site Health → Info → Server. For other sites, create a file called info.php in the site's folder containing <?php phpinfo();, open it in your browser, then delete the file straight away so it isn't left public.

Troubleshooting

  • White screen or "critical error" after changing version: switch back to the previous version, update your plugins and theme, then try again. Your error log will show which plugin or theme caused it. See Find and read your website error logs.
  • A setting doesn't change: make sure you chose the right domain as the location. A php.ini or .user.ini file in a subfolder, or a php_value line in .htaccess, can override it.
  • "The uploaded file exceeds the upload_max_filesize directive": raise upload_max_filesize and post_max_size as above.
  • "Allowed memory size of ... bytes exhausted": raise memory_limit. If it keeps happening, a plugin is likely misbehaving.
  • Site is slow rather than broken: see Using XRAY PHP to diagnose a slow WordPress website.

Need help?

If you get stuck, open a support ticket and we'll help.

Was this answer helpful? 0 Users Found This Useful (0 Votes)