Installing Magento
These notes are currently being updated.
I’ve installed Magento before and remember having problems so I’m gonna document my efforts here so that I don’t forget next time.
First I’ll document installing Magento on my Windows 7 / XAMPP environment. Once that’s done I’ll show you what I’ve done on my reseller shared server account at Heart Internet UK.
Installing Magento on my Windows 7 / XAMPP
Magento 1.4.0.1 wont run under PHP 5.3. That rules out the latest version of XAMPP. If you want to use Magento you may have to downgrade XAMPP to version 1.7.1.
To download Magento you’ll have to register with their site. Do so and download the Magento Full release and also the latest sample data. I’m using magento-1.4.0.1.zip which was the latest at my time of install.
I’ve created a new local test folder called c:websitestestshop .
I need to setup a virtual host in apache. Here is the first important bit. The mix of Magento and some browser (Firefox / IE / Safari) on a local install has problems assigning cookies. The solution is to ensure that the virtual host name has a dot in the name.
With this in mind I’ve setup a virtual host called www.testshop.com which points to the c:websitestestshop folder.
Below is the apache vhost entry:
<VirtualHost *> DocumentRoot "C:/web/sites/testshop" ServerName testshop.com:80 <Directory "C:/web/sites/testshop"> Options Indexes FollowSymLinks Includes AllowOverride All Order deny,allow Deny from all Allow from 127.0.0.1 DirectoryIndex index.php index.html index.htm </Directory> </VirtualHost>
In my c:windowssystem32driversetchosts file I have the entry.
127.0.0.1 testshop.com
I unzip the magento install zip file in a temp folder. This gives me a “magento” folder.
I also unzip the sample data zip file. This gives me a “magento-sample-data-1.2.0” folder.
I then put the sample data “media” folder into my “magento” folder.
Now I’m going to create a database. I use PHPMyAdmin to create an empty database called testshop.
Once created I then need to load the sample data into it.
Select the testshop database / Choose the SQL option / COpy and Paste the text from the sample data magento_sample_data_for_1.2.0.sql file / Press the Go button. This should load up all the demo data.
Now I move the magento folder into my c:websitestestshop folder so that now I have my installation in c:websitestestshopmagento.
Once all that is done we start the install:
I point my Firefox browser at http://testshop.com/magento and I get the initial screen.
I click the agree tick box and hit the Continue button which then brings up the Localization page.
Figure 2
I enter English UK / GMT / British Pound Sterling – then Continue which takes us to the
Configuration Page
Figure 3
I enter the root and user password for my database and also choose to save the session data in the db.
I press continue and wait for the computer to whir away. The process takes about 2 mins on my machine before reporting back with the Create Admin Account page.
Figure 4
I fill in the details then hit continue again and get the “You’re all Set!” page.
Figure 5
I’m all set! With an encryption key which I keep in a safe place.
I now have the option to have a look at the Front End or the Back End. I’ll choose the back end so click “Go to Backend”.
I now get the login panel.
Figure 6
I insert my username and password and…
Figure 7
The Dashboard appears with some messages I’ve got to read. Strangley it tells me that Magento CE Version 1.4.0.1 Stable is now available. Isn’t that what I’ve just loaded?? I thin it is. I close this message and goto the message inbox (System / Notifications) – View 50 – Select All – Actions – Mark as Read – Submit.
The I click Dashboard in the menu.
Figure 8
Apart from the “One or more of the Indexes are not up to date” message all seems to be well.
Now I’ll check the Front End.
I enter http://testshop.com/magento into my browser and get the screen :
Figure 9
The local install seems to be working. Yay!
Installing Magento on Heart Internet Shared Servers
Caveat Number 1. I recently read that Heart Internet do not suggest that magento is installed the shared server because it’s too CPU hungry. I’ll give it a go with this latest version but may have to shift to a dedicated server to ensure performance.
To install the files you can upload the zip file to the folder you require and using the Heart Internet Control Panel File Manager – right click the zip file to unzip it.
When I searched the Magento site for info. Jeremy has done these notes below which I’ve amended slightly for my purposes. Kudos to him for writing it down. I’m doing the same here so I never lose them.
Heart Internet are a shared hosting provider in the uk (heartinternet.co.uk). These are the steps to a (hopefully!) successful install:
1) download the latest version of magento from http://www.magentocommerce.com/download . I used magento-0.8.16100.zip
2) follow the instructions in http://www.magentocommerce.com/knowledge-base/entry/magento-installation-guide
They are reproduced below:
a) check system requirements – Heart Internet have all the relevant versions and extensions installed so no problem there.
b) transfer the zip file to your site and unzip them usingthe Heart Internet Control Panel File Manager – right click the zip file to unzip it. If you want the site in your root domain then unzip the file into the public_html directory.
c) Create a brand new mySQL database within the HI control panel. During the magento install wizard you’ll need the host (localhost), user id, password and db name (probably the same as the user id but can be checked by editing the db in control panel).
d) Contact HI and ask them to allow “CREATE TEMP TABLE” permissions on your database. Heart stop this by default for security reasons
e) Set the permissions against the install files. In your FTP program (I use Filezilla) you right click on the remote file and hit properties, you can then change the permissions of each file or directory (other ftp programs will be similar).
Set file /public_html/magento/var/.htaccess,
the directories /public_html/magento/app/etc, /public_html/magento/var,
and all the directories under /public_html/magento/media to 777.
3) Now we also need to set some further permissions.
Ensure that /public_html/magento/index.php and the magento directory itself are both set to 755.
4) Edit the file /public_html/magento/.htaccess and add the following:
############################# ## For heart internet SetEnv DEFAULT_PHP_VERSION 5 php_flag short_open_tag on
5) Create a new text file within /public_html/magento/ called php5.ini
put the following in this file:
php_flag short_open_tag on
6) If you want to install the demo store data then you should now load in the SQL statements in against the MySQL database – before the installation process
Double check everything then go to http://www.yoursite.com/magento/ and you should see the installation wizard. It’s pretty obvious from there on, just enter the db details and localisation etc.
Now I want to install the Modern Theme.
I go to the Admin menu. Choose Magento Connect. Change the settings to Beta. Then install the extension key magento-core/Interface_Frontend_Default_Modern (it’s free).
It should be that simple but I am noticing that this step frequently buggers up my install.
It seems to have installed and my update page displays all this:
magento-core/Mage_Core_Modules requires package "magento-core/Lib_Google_Checkout" (version >= 1.4.0.0, version <= 1.4.1, excluded versions: 1.4.1) magento-core/Mage_Core_Modules requires package "magento-core/Lib_Js_Calendar" (version >= 1.51.0, version <= 1.52, excluded versions: 1.52) magento-core/Interface_Frontend_Default_Modern requires package "magento-core/Mage_Core_Modules" (version >= 1.4.0.0, version <= 1.4.1, excluded versions: 1.4.1) downloading Lib_Varien-1.4.0.0.tgz ... Starting to download Lib_Varien-1.4.0.0.tgz (126,181 bytes) . . . . . . . . . . . . . . . . . . . . . . . . . ...done: 126,181 bytes downloading Lib_Js_Mage-1.4.0.1.tgz ... Starting to download Lib_Js_Mage-1.4.0.1.tgz (87,791 bytes) ...done: 87,791 bytes downloading Lib_PEAR-1.4.0.0.tgz ... Starting to download Lib_PEAR-1.4.0.0.tgz (118,829 bytes) ...done: 118,829 bytes downloading Lib_ZF-1.9.6.0.tgz ... Starting to download Lib_ZF-1.9.6.0.tgz (1,763,063 bytes) ...done: 1,763,063 bytes downloading Lib_Js_Prototype-1.6.0.3.0.tgz ... Starting to download Lib_Js_Prototype-1.6.0.3.0.tgz (222,617 bytes) ...done: 222,617 bytes downloading Mage_Pear_Helpers-1.0.18800.tgz ... Starting to download Mage_Pear_Helpers-1.0.18800.tgz (9,225 bytes) ...done: 9,225 bytes downloading Lib_ZF_Locale-1.9.6.0.tgz ... Starting to download Lib_ZF_Locale-1.9.6.0.tgz (1,522,612 bytes) ...done: 1,522,612 bytes downloading PEAR-1.9.0.tgz ... Starting to download PEAR-1.9.0.tgz (291,634 bytes) ...done: 291,634 bytes downloading Archive_Tar-1.3.6.tgz ... Starting to download Archive_Tar-1.3.6.tgz (17,600 bytes) ...done: 17,600 bytes downloading Structures_Graph-1.0.3.tgz ... Starting to download Structures_Graph-1.0.3.tgz (30,191 bytes) ...done: 30,191 bytes downloading Console_Getopt-1.2.3.tgz ... Starting to download Console_Getopt-1.2.3.tgz (4,011 bytes) ...done: 4,011 bytes downloading XML_Util-1.2.1.tgz ... Starting to download XML_Util-1.2.1.tgz (17,729 bytes) ...done: 17,729 bytes install ok: channel://connect.magentocommerce.com/core/Lib_PEAR-1.4.0.0 install ok: channel://pear.php.net/Archive_Tar-1.3.6 install ok: channel://pear.php.net/Structures_Graph-1.0.3 install ok: channel://pear.php.net/Console_Getopt-1.2.3 install ok: channel://pear.php.net/XML_Util-1.2.1 install ok: channel://pear.php.net/PEAR-1.9.0 install ok: channel://connect.magentocommerce.com/core/Mage_Pear_Helpers-1.0.18800 install ok: channel://connect.magentocommerce.com/core/Lib_Js_Prototype-1.6.0.3.0 install ok: channel://connect.magentocommerce.com/core/Lib_ZF_Locale-1.9.6.0 install ok: channel://connect.magentocommerce.com/core/Lib_Js_Mage-1.4.0.1 install ok: channel://connect.magentocommerce.com/core/Lib_ZF-1.9.6.0 install ok: channel://connect.magentocommerce.com/core/Lib_Varien-1.4.0.0 PEAR: Optional feature webinstaller available (PEAR's web-based installer) PEAR: Optional feature gtkinstaller available (PEAR's PHP-GTK-based installer) PEAR: Optional feature gtk2installer available (PEAR's PHP-GTK2-based installer) PEAR: To install optional features use "pear install pear/PEAR#featurename"
When you visit the front page again we still have the same Theme. We need to change the theme from the Admin Menu.
Choose System / Configuration / General / Design
Set the following:
Templates : default
Themes : modern
Now when you look at your store you’ll see the the new theme but probably still in the wrong format. This is because you’ll need to edit the Front Page makeup in the CMS section.
The Modern theme needs just the 1 column Home Page enabled. Go to the CMS menu, select the Pages option, then the Home Page 2 Column with right bar and choose the disable option and save it. Then choose the Home Page 1 Column option and “Enable” then save it.
The Modern Theme should now be fully active.
Note : Because I tried to enter the demo data after the shop was configured I got an error – but the error was surpressed with the message Exception printing is disabled by default for security reasons.
To reset that I changed the file errors/local.xml.sample to local.xml.