How to add MIME types and run .html files as PHP

For hosting customers · Updated 2026-10-29

On this page
  1. Add a MIME type
  2. Run other extensions as PHP
  3. Run CGI scripts
  4. Good to know
  5. Common questions

MIME Types & Handlers controls how a website sends and runs its files: which content type a file extension is sent with, which extensions run as PHP, and whether CGI scripts run in cgi-bin. Use it instead of AddType and AddHandler lines in .htaccess, which are not applied here.

Add a MIME type

  1. Log in to the control panel (https://<server>:2083).
  2. Open MIME Types & Handlers in the menu (section Advanced).
  3. Choose the website at the top and click Show.
  4. Under MIME types, enter the Extension without the dot (for example webmanifest) and the Type (for example application/manifest+json).
  5. Click Add.

You see MIME type saved. It applies within a minute. To undo it, click Remove in its row.

Run other extensions as PHP

Old sites sometimes keep PHP code in .html pages.

  1. On the same page, under Handlers, tick the extensions to run as PHP: .html, .htm, .shtml, .phtml, .php5, .php7 or .inc.
  2. Click Save.

The setting applies within a minute, for that website only.

Run CGI scripts

  1. Under Handlers, tick Run CGI scripts in cgi-bin/.
  2. Click Save.
  3. Put the script in the cgi-bin folder of the website. Its first line names the interpreter, for example #!/usr/bin/perl.
  4. Make the script executable: set its permissions to 755 in the File Manager.

Good to know

  • Up to 50 MIME types per website. Extensions are 1–10 lowercase letters or digits.
  • PHP extensions (php, html and the others above) cannot be given a MIME type; use Handlers for them.
  • Running .html as PHP makes every .html page pass through PHP, which is a little slower. Turn it on only when the site needs it.
  • If the page shows These settings need the built-in web server; this server uses another one., your server cannot apply them; contact your hosting provider.

Common questions

Do these settings apply to all my websites?

No. MIME types and handlers are set per website. Choose each website at the top of the page and save its own settings.

Can I make images run as PHP?

No. Only the extensions listed under Handlers can run as PHP, never images or other uploaded media.

Was this article helpful?

Still stuck?

Ask the AI about your exact situation — it answers from this knowledge base — or contact us.