Magento – Magento Sample Data on already installed magento

magento-1.8sample-data

Just a simple question here. I am using XAMPP(from Bitnami) and as you might know bitnami also provides magento installation, so i downloaded that exe file and installed magento. Now what i want is to make a tech e-commerce website but i am totally new to this and thus i was watching these youtube videos.

So here is my question: I was wondering that if i could just install that sample data into my current system and just take it out when i am done. But i do not prefer installing, re-installing and uninstalling as because the last time i installed magento (from bitnami) it didn't work so i needed to re-install and this time it luckily did so i do not want to mess it up. So what is the best option available to me?

Best Answer

It is possible to change the database that Magento uses after it has been installed. So the steps for your scenario would be:

  1. install sample data into a separate database
  2. copy the product images into your Magento installation
  3. edit app/etc/local.xml and change the database to the one with the sample data present
  4. delete var/cache
  5. opening the site in the browser should now trigger the installation routine and you will end up with a store including the demo data

Uninstalling the sample data is not easily doable. You can delete all products which gets you some of the way there. However overall I would suggest keeping the store with the sample data separate. If you don't mind the product images from the demo store clogging up your system you can reverse step 3. and then deleting the cache to get back to your original database.

Related Topic