How can I specify the PHP version on the (gs) Grid-Service?
Overview
The (gs) Grid-Service offers you the option of choosing between several different versions of PHP.
TIP:
Any new domains added to your (gs) Grid-Service will default to using PHP stable.
Instructions
You can choose your version of PHP from the AccountCenter. The specific version of PHP 5 offered here is the (mt) Media Temple-recommended version for both stability and security: Version 5.3. This version of PHP 5 includes the Suhosin hardening patches.
- Log into your AccountCenter.
-
From the Overview page or Domains tab, select your primary domain. See Figure 1.

Figure 1. - This opens your (gs) Grid-Service Control Panel. Click on PHP Settings, see Figure 2.
- Now, select your desired version of PHP.
-
Click save. The appropriate
AddHandlerline will be added to your.htaccessfile.
NOTE:
We recommend moving away from PHP 4, if possible. The available version of PHP 4 is updated with all security patches available for that version of PHP, but is not compatible with the extra security features available with the Suhosin patches. Also, deprecated versions of PHP will soon be phased out.
Manually set PHP version
This section provides instructions on using a version of PHP that is older or newer than the default one available on the (gs) Grid-Service platform. Note that the default versions described above are the only guaranteed stable versions that we suggest. However, both older and newer versions of PHP are frequently available for your use, for the purposes of application compatibility.
CAUTION:
Use a non-default version of PHP at your own risk.
Older versions of PHP are typically "left over" from previous stable versions. They are typically fully integrated with the (gs) Grid-Service, but may not have the latest security features.
Note: PHP 4 and PHP 5.2 are no longer supported by the PHP Group. For more information, see the announcements for PHP 4 EOL and PHP 5.2 EOL.
Newer versions of PHP are intended to be as bleeding-edge as is possible on a shared platform (you'll need a (dv) Dedicated-Virtual Server or (ve) Server to be able to grab new versions the day they come out). These versions may not be stable and may not be fully integrated with the grid, and almost certainly do not have all the components (gs) Grid-Service customers have come to expect.
Latest version
Follow these instructions to always use the latest version of PHP that (mt) Media Temple has built into the (gs) Grid-Service. You won't have to update the version every time a new one comes out - the link does the work for you.
-
Add the following lines to your .htaccess file:
Filename: .htaccess
AddHandler php-latest .php -
Upload your file to the directory you want to use for testing the newest version of PHP. Typically, this will be your
/home/00000/domains/example.com/directory.
Now all PHP scripts in that folder will use the latest version of PHP.
Stable version
Follow these instructions to always use the stable version of PHP that (mt) Media Temple has built into the (gs) Grid-Service. You won't have to update the version every time a new one comes out - the link does the work for you.
-
Add the following lines to your .htaccess file:
Filename: .htaccess
AddHandler php-stable .php -
Upload the file to the directory that you want to use the specific version of PHP. Typically, this will be
/home/00000/domains/example.com/.
Now all PHP scripts in that folder will use the stable version of PHP.
Resources
- The authoritative source for PHP information is at http://www.php.net
- FAQs on PHP4 EOL