How to change your PHP version and limits Print

  • 0

PHP is the language WordPress and most websites run on. You can choose the version and change its limits yourself.

Change your PHP version

  1. Log in to cPanel (see How to log in to cPanel).
  2. In the Software section, click Select PHP Version.
  3. Choose a version from the PHP version menu. It's saved straight away.

Select PHP Version in cPanel

Tip: Check your site after switching. If anything breaks, switch back to the previous version. Before a big jump, update your WordPress plugins and theme first.

Change PHP limits (memory, upload size)

If you see errors like "Allowed memory size exhausted", "The uploaded file exceeds the upload_max_filesize" or a page timing out, raise the limit:

  1. On the same Select PHP Version page, click the Options tab.
  2. Find the setting and change its value. Most are drop-down menus: click the value and pick a new one. Changes are saved straight away.

PHP Options tab with common limits highlighted

SettingWhat it does
memory_limitHow much memory one page can use. Raise it for "memory exhausted" errors.
upload_max_filesizeThe largest file you can upload, for example a theme or a video.
post_max_sizeShould be the same as or bigger than upload_max_filesize.
max_execution_timeHow many seconds a script can run before it stops.

Extensions

The Extensions tab lets you turn PHP extensions on or off, for example imagick for better image handling. Most sites never need to change these.

Tip: Settings changed here apply to every site on your account. To give one domain its own settings, use the Per Domain Settings tab at the top of the page.

Still seeing an error? See Fixing common WordPress errors.

Still stuck? Open a support ticket and we'll help.


Was this answer helpful?

« Back

Powered by WHMCompleteSolution