How to install Magento on Wamp Server (Windows XP) with sample data.

Hello techies,

I was trying to install Magento on my local server using WAMP. Well, Magento is an award winning open source ecommerce application. This will help a newbie on installing Magento on your system using WAMP.

Here is it how?

1. Download and install WampServer 2.0f which contains Apache Version: 2.2.11, PHP Version: 5.2.8, MySQL Version: 5.1.30, phpmyadmin 3.1.1.
[Latest versions of WampServer contain PHP 5.3. But Magento doesn’t work with PHP 5.3. If you want to use a latest version (e.g.: WampServer 2.0i), then you must download & install PHP 5.2.8 add-on to the WampServer2.0i and load it via WampServer -> PHP -> Version -> 5.2.8]
2. Download and
3. Extract Copy and paste Magento (or folder name) folder in to www directory of the WampServer.
4. Make a database for Magento demo store at your WampServers phpmyadmin interface as shown below. Write down the database name, user name, and password as you will need these later.
a)    Create New Database.
Phpmyadmin -> Create new database – Database name –> Create.

b)    Add New User and User Password.
Server: localhost -> Privileges-> Add a new User -> Select appropriate drop downs as shown below; put your username & password -> Check all privileges -> GO.

c)    Add User to Database.
Server: localhost -> Privileges -> Select username -> Edit privileges

Database specific privileges -> Select Database name from drop down

The page will refresh-> Check all privileges -> Go.
5. Extract your Sample Data package You will get a SQL file and a “media” folder.
6. In the leftmost column of your Phpmyadmin click on the database name that you created, now click on Import in the central menu bar at your database and select that SQL file, which came in unpack of Sample Data package. Then click Go. A list of your new tables will appear below your database name in the left-hand column. Now you can close phpMyAdmin.
7. Go back to the sample data folder. Copy catalog folder inside the ‘media’ folder to the Magento ‘media’ folder on the www directory.
8. Load the php extensions mcrypt.dll and curl.dll.
WampServer -> PHP -> PHP extensions -> Click on php_curl & php_mcrypt.
In addition to this, you may also need to make sure you are loading: php_pdo, php_pdo_mysql.
9. Now enter http://localhost/magento(or folder name)/ on your browser for installation Step-by-Step Wizard.  Just proceed as explain below.

a.    First step, Click on the check box “I agree to the above terms and conditions” and click on the Continue button.
b.    In Second step, leave localization to its default values and Click on Continue.
c.    In the Third step, enter the database name, database user name, database user password, & checkSkip Base URL Validation before the Next Step and click on Continue. (This step will take 1 minute or more, since that step stores the tables in the database).
d.    In Fourth step enter your personal information and login information (admin name & password for dashboard) and don’t forget to write down admin password. (Leave encryption key). Click on Continue.
e.    In the Final step, please make a note of your encryption key and make sure you keep it in a safe place. (Magento uses it to encrypt passwords, credit cards and more).

10. Installation completed. Now you can open Frontend (http://localhost/magento (or folder name)/) and Backend (http://localhost/magento (or folder name)/index.php/admin/dashboard) on your browser.

11. If you can’t Log in to Admin Panel after installation, that’s a cookie problem. The solution for this problem is to modify the core Magento code as explain below.

Copy the Varien.php file from:
C:\wamp\www\magento\app\code\core\Mage\Core\Model\Session\Abstract\Varien.php and
Paste in to the C:\wamp\www\magento\app\code\local\Mage\Core\Model\Session\Abstract\Varien.php (create folders Mage\Core\Model\Session\Abstract\). Open the same file and go to line 96 or locate the code similar below:

Replace the code found in line 96 with this one.

The purpose of this code change is to disable the Magentos domain checking only if it is accessed via localhost and run as usual if it is being accessed through a valid domain.
Now you can Login to Admin Panel http://localhost/magento/index.php/admin/ with your admin username and password.
12. If you browse through the Magento demo store; store doesn’t show any products. To resolve this problem Log in to Admin Panel go to System—>Index Management.  Select fields in Status — ‘REINDEX REQUIRED’, then choose ‘Reindex Data’ from drop down and click Submit.
13. If you want to change Header, navigate through Admin Panel > System > configuration > design > header > Welcome Text > Change default welcome message, Save.
To change footer; find the page footer file from magento\var\cache\ folder, change footer and save it.
All the best!!!