Home » Magento

How to Install Sample Data for Magento?

7 July 2009 3,031 views Popularity: 6% Share/Bookmark

email

Remember that, Sample Data must be installed prior to the basic Magento Installation. But never mind if you forgot to install sample data before installing Magento.

Here, I will show you how you can install sample data after you have installed Magento.

1) Download Sample Data zip file from Magento Website

2) Extract the zip file

3) Drop all the tables from your magento database. It would be easy to drop the magento database and then recreate it instead of dropping individual tables. This can be done either through Database Manager or PhpMyAdmin.

4) Import sample data sql file into your magento database.

# Remember that, you have to drop all tables from your magento database before importing the sample sql file. You will get error afterward if you import the sample data without dropping tables from your magento database. Therefore, step 3 is important.

5) Go to your magento installation folder and delete local.xml file present inside app/etc folder.

6) Reinstall magento (i.e. if you have uploaded magento inside http://yourdomain.com/magento then type the address in your browser’s address bar :))

# After your installation is complete, you may get error something like this:
Integrity constraint violation: 1062 Duplicate entry ’1′ for key 1

Check if app/etc, var, and media folders are writable. They should be writable. Change their CHMOD to 777.

Clear your browser cache or open your website in another browser and you are done :)

Related posts:

  1. Magento: How to select, insert, update, and delete data?
  2. Magento: Describing Flat Catalog
  3. Magento: Reindex Data Programmatically
  4. Sample valid credit card numbers for testing
  5. Magento: Read Write XML
  6. Configuration error on new Magento installation
  7. Magento 1.4: No products displayed in category listing
  8. Magento: Helper Data not found error
  9. jQuery: Grey out background and preview image as popup
  10. Magento: How to run Magento code in an external website?
  • http://curtmughal.multiply.com/journal robert

    robert…

    excelent post, keep it coming…

  • Jaime

    Hello… I cannot avoid “Integrity constraint violation” error

  • Jaime

    Hello… I cannot avoid “Integrity constraint violation” error

  • Atit

    Thanks for all the help.. It worked wonders.. Thank you sooooo much….

  • Muhammadtalha

    Thanks. I tried this on Magento 1.6 and it worked.

    Thanks