MediaTemple Magento Installation Guide - Dedicated-Virtual Server

Last modified by Mike Plant on Mon, July 19, 2010 17:21
Source|Old Revisions  

This is an old revision of the document!

Important Note:

Media Temple’s DV servers now support PHP5, and this article is now somewhat outdated, with the exception being the SSH instructions for downloading and untarring Magento to your server.


This article is a quick step-by-step tutorial on installing Magento on Media Temple (mt) Dedicated-Virtual Server (dv) account. If you have a Grid Service (gs) account you’d read our How to install Magento on Media Temple (mt) Grid-Service (gs) tutorial.

If your (DV) server has Plesk installed, you must disable “CGI support” in the domain setup section of Plesk or you will receive a 404 error.

Download Magento

Please note: Before you start, please make sure you replace the version number to the latest version in the commands shown below.

tar -zxvf magento-

Install PHP5 CGI binary

Media Temple does not yet provide PHP 5.2 or newer on their (dv) servers. As Magento is a PHP5-only application you will have to install PHP5 as a CGI binary and configure the web server to use it instead of the default PHP4.

It is possible to compile a PHP5 binary yourself, but for the purposes of this solution, we’ve provided one for you. You can download it here:

Note: you will need root access on your DV account to accomplish this part of the installation. To enable root access, you’ll need to open a support ticket in your account center, per this MT Knowledge Base article:

cd /var/www/
chmod 755 cgi-bin
cd cgi-bin
chmod 755 php5-cgi

After that you should get the following:

ll /var/www | grep cgi-bin
drwxr-xr-x  3 root      root 4096 Oct 26 12:25 cgi-bin
ll /var/www/cgi-bin/ | grep php5
-rwxr-xr-x  1 root root 18440550 Aug 31 11:15 php5-cgi

Modify the Magento .htaccess file

By default, the web server will want to run the Magento application using PHP4, which will not work. In order to point it to the new PHP5 CGI binary, you must modify the .htaccess file in the Magento top-level directory to look like this:

<IfModule mod_php5.c>
    php_flag magic_quotes_gpc off
    php_flag short_open_tag on

Action php5-cgi /cgi-bin/php5-cgi
AddHandler php5-cgi .php

DirectoryIndex index.php

RewriteEngine on

#RewriteBase /

RewriteCond %{REQUEST_URI} !^/media/
RewriteCond %{REQUEST_URI} !^/skin/
RewriteCond %{REQUEST_URI} !^/js/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule .* index.php

Set necessary permissions

Set up necessary permissions on files and folders. Ensure that the file magento/var/.htaccess, the directories magento/app/etc, magento/var, and all the directories under magento/media are writable by the web server

cd magento
chmod o+w var var/.htaccess app/etc
chmod -R o+w media

Create a MySQL database and user

Go to your database management interface, create a database, a MySQL user, and password that Magento will use.

Take note of the settings (including database hostname) - you will need that information while installing Magento.

Run the installation wizard

Use your web browser to surf to any Magento page (for example /install or anything) and you will be forwarded to the installation wizard.

Review the license and confirm that you agree on the first step.

Specify database connection and URLs

Enter the database connection data into the fields, check whether installation wizard correctly determined your web-host name and path.

Create an administrator account

Enjoy using Magento!