Using PHP in .html files on MediaTemple hosting

Posted by on Feb 7, 2011 in Technology | 4 Comments

Trying to use PHP code in .html and/or .htm files on MediaTemple? Modify your existing .htaccess file with the following:

AddHandler php5-script .php

AddHandler php5-script .php .html .htm

That will allow the MediaTemple servers to consider .html and .htm files valid extensions for running PHP code.


  1. Amanda W
    May 1, 2011

    Fantastic. Worked like a charm! Thanks. :) :razz:

  2. Anton
    October 5, 2011

    Great and Congrats. My only 5 cents are after copying disk image from HDD to SDD the performance was not that great. Dunno what was wrong: blocks size, fragmenting? But after restoring from Time Machine instead the speed was great.

  3. djela
    November 13, 2012

    thanks, it worked! simple and elegant way to include wordpress feed (through php) keeping my html extensions. used method for wordpress integration. thanks again.

  4. djela
    November 13, 2012

    sorry, very useful and simple method to ‘Display WordPress content outside your blog’ is

Leave a Reply