Start a conversation

How to configure HTML files to be processed by PHP

For PHP files to be processed by PHP please locate or create the .htaccess file in the root directory of the site.

Where is the root directory by default?

On hosting with cPanel:

  • for the main domain — in the folder home/username/public_html,

  • for an additional domain — in the folder with the domain name: home/username/for-example.com.

On hosting with the DirectAdmin panel:

  • in the folders domains/domain.com/public_html.

Please note that by default, the root directory of the user opens in the File Manager — home/username/,  where 'username' is the hosting login.

In the .htaccess file, add the following line:

AddType application/x-httpd-lsphp .html

If you have any questions, do not hesitate to contact support.

Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Oleksii Momot

  2. Posted
  3. Updated

Comments