Change PHP Limits or Version

How to change your PHP limits or version if your website is hosted on our cPanel servers to get the best out of your website.

Change PHP Limits or Version

You can change your websites PHP limits if you are using our cPanel packages by following these steps

PHP has a LOT of buttons you can push. How you manage these will directly impact your website's performance and stability. Get it right, and PHP will work very hard to make you happy. Get it wrong, and you will not only get PH-POO-POO, a slow website, but you could open the door, leading to security vulnerabilities.

In the world of PHP, MORE is NOT always better. PHP runs on a per-script basis. So basically, you might make your website's performance a lot worse by going overboard.

When setting PHP values, think of a single lane highway. The highway has the default 190 KM/h speed limit like we do in South Africa. Your script is a taxi and only goes 60 KM/h, like most taxis in South Africa. Now, a GTI with a big exhaust comes up at 190 KM/h, as this was the limit, and OUTsurance gets a call.

You should always follow the best practices defined by your platform theme and any plugins you may use. All good themes and plugins will give you their recommendations that may differ from our default settings.

You can change these values by editing your php.ini file or use the cPanel interface that gives you a stripped-down version to simplify the process. We recommend using the cPanel interface as this will generally help you with what you need to avoid converting your website into a big fat 404 error.‌

To do this, log into your cPanel account. If you know the username and password, you can access your cPanel account directly by typing the URL, followed by cPanel or colon port 2083, as shown below.

You can also access your cPanel account by logging into your Client Area, navigating to Services, My Services and then clicking the website you want to change, followed by "login to cPanel", as shown below.

Once you have logged in, look for the "Select PHP Version" located under the "Software" tab.‌

‌To change the PHP Version, click the drop-down arrow and select what version you would like. Although we do support PHP 8, most software vendors recommend PHP 7.4.‌

You need to click "set as default" once you have changed this. Below we have changed this to PHP 7.3.‌

To change the PHP limits click "options", then change them to your requirements. You need to follow a hierarchy when setting these values. The most straightforward way is to go down in size, as depicted in the picture below.‌

By default, we set the max_input_vars to a value of 2000. You can raise this to about 3000 if required. However, this is another case where more is not always better. Setting this value too high may decrease performance as well as introduce security risks.

The below values are the recommendations for a standard WordPress site. However, you may find different settings when using our cPanel servers. We recommend leaving them unless you are sure you know what you are doing.‌

General Best Practices for a WordPress Website