How to Install Magento Sample Data

Magento e-commerce is great. But their instructions are abysmal.

I had a horribly difficult time installing Magento’s sample product data the first time that I tried. No clear instructions existed‚ until now. Enjoy!

Please note that if you’ve already tried to install Magento sample data without success, start from scratch with a new database or this will not work.

How to install Magento sample data:

Before you can start, you’ll need a clean database and the Magento program files. Create a new MySQL 5.0 database in your web hosting account and write down the database name, user name, and password as you will need these later. Download and unzip the Magento program files. Upload the contents of this folder to your server using FTP, but do NOT actually install yet. Just upload the files. Now you’re ready.

1.) Download and unzip the Magento sample data. Do NOT upload this folder to your server.

2.) Within this folder, you will find the file: magento_sample_data_for_1.2.0.sql. Open this file in a text editor, select its entire contents (Ctrl+A), and copy this to your clipboard (Ctrl+C).

3.) Open phpMyAdmin from your web hosting account. In the leftmost column, click on the name of the database that you created.

Install Magento sample data 1

4.) Next, click on the small, square icon labeled ‘SQL’ that is second from the left in the top-left corner.

Install Magento sample data 2

5.) You should now see a pop-up window. Paste (Ctrl+V) into this area what you previously copied to your clipboard and then press ‘Go’.

Install Magento sample data 3

6.) If this worked, you just installed tables into your database containing the Magento sample product data! A list of your new tables will appear below your database name in the left-hand column. If so, you can close phpMyAdmin. If not, just try again or try using a different web browser until it works.

Install Magento sample data 4

7.) Go back to the sample data folder that you downloaded. Within this folder, you’ll find a folder called ‘media’. Upload this entire ‘media’ folder to within the existing ‘media’ folder on your server.

8.) Now navigate to the URL where you are installing magento and run through the installation wizard to install the Magento program itself. Here you’ll be able to enter your database name, user name, and password.

Install Magento sample data 5

That’s it!

If everything worked, Magento should be up and running with the Magento sample product data installed!

When you’re ready to build your real Magento site with products that you are actually selling, it’s best to start with a new database and a new Magento installation. If you try to just delete all the sample products and use the existing installation, you’ll still have a lot of unnecessary junk in your MySQL tables. Just don’t forget to back up your CSS and theme files if you customized them before deleting your sample install. Good luck!


12 Responses to “How to Install Magento Sample Data”

  1. Donna Jones says:

    What a great post.
    Installation worked first time, really easy to use and understand.

    Many Thanks.

  2. Felix Gomez says:

    Hi, I have imported the sample data and install magento with breeze. But I have a problem with the Best Seller Products on the home page. If I will click one of them, I will get a 404 error.

    It says….

    The page you requested was not found, and we have a fine guess why.

    * If you typed the URL directly, please make sure the spelling is correct.
    * If you clicked on a link to get here, the link is outdated.

    Can you enlighten me on this one?

    • Felix, I’ve not encountered that ever. You might try the magento forums or yoast.com, which is frequented more by programmers, than designers. They might be able to help on that specific question. I’m on the design & monetization side. Hence my emphasis on easy-to-use instructions. Good luck man!

    • Manoj Talwar says:

      Rebuild the indexes. This will fix it.

    • Homem Robô says:

      If you got 404 and can see the data on admin AND panel, then you must have to reindex your data. Go to Index Management and let magento rebuild your data for you.

    • Homem Robô says:

      I mean: admin AND home

  3. Theme Labs says:

    Hey-

    This is a great post. Seems like the Magento folks could post something like this on their documentation page, but nooooooooooo.

    I have referred several people to your simple instructions. Saves me a lot of time and wasted phone calls.

    Thanks again,

    Karl

  4. Jhopong says:

    Same here. I’m getting a 404: Page not found error whenever I click a link. Odd indeed…

  5. Rich says:

    You just saved me a LOT of time. Good how-to!! Thanks!

  6. digitalbd says:

    hi mate,i am getting this error

    PHP Extension “pdo_mysql” must be loaded

    can u tell me how i can fixed?

Leave a Reply