*By default, only files with the .php and .phtml extensions are considered PHP scripts. **

To enable PHP-code processing in files with .html or .htm extension, you need to create a file named .htaccess in the site directory or just open it if the file already exists

Add the following lines to the beginning of the file or make the lines look like this

# php -- BEGIN cPanel-generated handler, do not edit
<IfModule mime_module>  
  AddType application/x-httpd-ea-php70___lsphp .php .php7 .phtml .htm .html
</IfModule>  
# php -- END cPanel-generated handler, do not edit

In this example, the php version you are using on this site will be 7.0, if you want another version - specify it instead of ea-php70, for example the value ea-php72 corresponds to the version of php 7.2.

An example for versions of php 5.6 would look like this:

# php -- BEGIN cPanel-generated handler, do not edit
<IfModule mime_module>  
  AddType application/x-httpd-ea-php56___lsphp .php .php5 .phtml .htm .html
</IfModule>  
# php -- END cPanel-generated handler, do not edit

So if you use php 5.3, instead of ea-php56 you need to use ea-php53.

Now the file with the extension html, htm will be treated as php

*If you change the php version used on the site through the order management panel in the billing or through cPanel, the procedure of php processing in html must be repeated

Updated Jan. 2, 2019