The process of setting your PHP version and the 'variables' (such as memory_limit values) differs slightly, depending on whether you have Bolt-Cache enabled or not (Bolt-Cache is an additional caching facility that is exclusive to our Premium plans).

If you are using our reseller hosting or standard shared hosting plans, see the following...

I am using shared / reseller hosting

You are able to make full use of our PHP Selector which is part of the Cloudlinux OS used here.


How to use the ‘Select PHP Version’ option in cPanel

Here is a quick video tutorial on how to change your PHP version using cPanel…

Users can find PHP Selector functionality under the “Select PHP version” on their cPanel home page.

The process of setting the PHP version can be found in the video above.

On the top right of the PHP Selector, there is a link to 'PHP options' where end-users can adjust the most important values. For example, memory_limit or upload_max_filesize.

End users do not need to modify any files like “php.ini”, ".user.ini" or “htaccess” manually – everything is done from the web interface.

I am using your Premium hosting and I have Bolt-Cache Enabled

First of all, awesome choice! Now that you are using our supercharged NGINX stack to its full advantage, its time to learn how to set your PHP version and PHP variables!

As we are no longer using Apache, its important first of all to clarify that the PHP Selector explained above will no longer be applicable.

How do I set the PHP version when using Bolt-Cache?

Easy! It's set when you enable Bolt-Cache in the first place! The Bolt-Cache interface explicitly asks you to select the version during its setup, which will be the version in use on the site.

Please note, that the PHP Selector is no longer in use at this stage.

How do I set PHP variables / options, such as memory_limit etc?

If your site is using Bolt-Cache or CloudNS, we have switched the backend of your site to raw NGINX with PHP-FPM so you can benefit from its outstanding performance! Clever, huh?!

So, at this stage we know that the PHP selector is ignored - so where do we set the variables and options for our sites?

All you need to do is create a .user.ini file in your public_html...

/home/yourusername/public_html/.user.ini (notice the '.' - its required!)

You now use this file exactly the same as you would with a php.ini file (if that makes no sense to you, not to worry!) - basically, you can use this file now to set your PHP options / settings as required for your site.

For example, lets set our memory_limit for the site to 512M. To do this, just add the following line to the file...

memory_limit = 512M

That's it! Save the file, and the changes will be applied instantly!

Did this answer your question?