Installing Sample Data Archive for Magento 1.2.0
UPDATE: Please see the following articles for up-to-date instructions:
If you would like to use the sample data, you will need to install Sample Data before installing Magento.
The archive file is available in (.zip) (9.8 MB), .tar.gz (9.7 MB), and .tar.bz2 (9.7 MB) formats to download (the files contain exactly the same content inside and are provided in different formats just for your convenience).
Each archive contains a SQL script that should be applied on a clean database with your database management tool (phpMyAdmin or whatever you use), and a ‘media’ folder with sample product images that you should copy to your Magento media folder.
You should then run the regular installation process as you would for a complete package. Please make sure that you have Magento version 1.2.0 or newer.
Please also backup all your data and keep separately any custom changes on the files you did, because they may not be compatible with the sample data provided.
Known Issue: Sometimes when importing the sql file into your DB using phpMyadmin you will encounter some errors. If your import was not successful please reference this thread.
Instructions on installing sample data for Magento version 1.1.2-1.1.8 are available on this page
Instructions on installing sample data for Magento version 1.0.19870 are available on this page