Lvato allows you to easily change the PHP version for your hosting account. You can also run multiple websites with different PHP versions on the same hosting package using a .htaccess file.
This guide explains both methods.
Follow these steps to change the PHP version for your hosting service.
Your selected PHP version will now be active for your hosting account.
If you host multiple websites on the same Lvato hosting package, you can configure each website to use a different PHP version.
For example, your main website can use PHP 8.5, while a second website uses PHP 7.4.
In File Manager, open the directory containing the website you want to configure.
For example:
public_html — Your primary website directory.public_html2 — Your second website directory, if configured.Make sure you are editing the correct website directory.
.htaccess..htaccess and open it.Note: If you cannot see the .htaccess file, enable the option to show hidden files in File Manager, if available.
At the very top of the .htaccess file, add the appropriate PHP handler for the version you want to use.
PHP 8.5
AddHandler x-httpd-php85 .php
PHP 7.4
AddHandler x-httpd-php74 .php
PHP 5.6
AddHandler x-httpd-php56 .php
Only add the handler for the PHP version you want to activate.
Your website should now use the PHP version configured in its .htaccess file, provided that version and handler are supported by your hosting service.
Suppose you have two websites hosted under the same Lvato hosting package.
| Website Directory | PHP Version | .htaccess Configuration |
|---|---|---|
public_html |
PHP 8.5 | AddHandler x-httpd-php85 .php |
public_html2 |
PHP 7.4 | AddHandler x-httpd-php74 .php |
Each website can run its own PHP version without requiring a separate hosting package.
You can check which PHP version your website is running by creating a PHP information file.
phpinfo.php.<?php
phpinfo();
https://yourdomain.com/phpinfo.php in your browser.The page will display your active PHP version and PHP configuration.
Important: Delete the phpinfo.php file after checking your version, as it exposes server configuration information.
.htaccess directives can cause website errors. If this happens, remove the handler you added and save the file again.If you experience any issues while changing your PHP version, our support team is here to help.
Visit Lvato to contact our support team for assistance with your hosting account.