Featured templates

Magento. Understanding sample data dump files

Norman Fisher November 22, 2011
Rating: 5.0. From 2 votes.
Please wait...

This tutorial is going to help you understand the dump.sql file usage on our Magento templates.

Starting from #30323 all Magento templates are provided with two dump SQL files: dump.sql and dump_minimal.sql. You can find them included to the “sources” folder of your template package.

The SQL files allow you to make your installed template look like the template preview without any manual configuration.

dump_minimal.sql – is used to configure the template and make it look like the template Preview. It replaces your store configuration with the template sample one. Dump_minimal.sql file will not add any sample products or categories to your store.

dump.sql – is used to configure the template and make it look like the template Preview and uploads the sample template products. It replaces your store configuration and all products with the template sample ones.

Please note: installation of the dump_minimal.sql file will not add any sample products to your store but it will drop your existing products tables. In other words it will delete your existing products.

Both files are imported the same way into your database (for the “Import Methods” see the end of the article), however, right from the beginning, you need to decide which of the two dump files matches your current needs, then choose one of the options below:

I. Using dump.sql

1. If you want to make you Magento site look the same as the live demo preview including the sample products, you need to import the dump.sql into your newly created database with no tables in it, right before Magento installation. I.e., importing the dump.sql file should be the first step of your Magento installation.

In case, there any tables in your existing database, but you still want to use the dump.sql file, please drop all tables.

2. If you already installed Magento with its sample database, but you still want to use the dump.sql file:

  • a) Drop all tables in your database (normally it’s done by checking all tables and selecting “Drop” from the drop-down menu at the bottom) till there are zero tables in it and import the dump.sql file.
  • b) Connect to your FTP, open the directory where your Magento files are stored and delete a file called local.xml in the \app\etc\ folder.
  • c) Open your Magento site in a web browser to see the first step of Magento installation (if you see something else, that means, the local.xml was not deleted or there is some other reason)
  • d) Double check if all steps above have been followed and proceed with installation.
  • e) Upload your template files using the text instructions that come with its package or instructions on this site;
  • f) Preview your site in the web browser again, it should look like the live demo preview.

II. Using dump_minimal.sql file

It is stated on the preview pages of Mangento templates that “Our magento themes are designed to be used with clean install without sample data that is provided with the default theme”. Which means, if you install a template without any dump file, it is not going to look like the live demo.

However, if you wish to make the template appear as at the template preview, but without any sample products you can use the dump_minimal.sql file. You can import it right into your current Magento database. It is highly recommended that you make a backup of your current database before importing SQL file.

How to backup a database

  • – Access the phpMyAdmin tool available in your hosting control panel;
  • – Select the database that you would like to backup;
  • – A new page will be loaded in phpMyAdmin showing the selected database. In order to proceed with the backup click on the Export tab;
  • – The options that you should select are specific for each server. You need to save your database as file (which will save the file locally to your computer in an .sql format);
  • – Click on the Go button to start the export/backup procedure for your database;
  • – A download window will popup prompting for the exact place where you would like to save the file on your local computer.

Right after you have made the backup, feel free to import the dump_minimal.sql file and open your site in a web browser. Only the home page should look like the demo.

However, now you won’t be avble to login to your admin panel. If you try to login, you are going to get a message about your login details being incorrect.

In order to fix this, on your FTP navigate to the directory where your Magento files are stored and delete a file called local.xml in the \app\etc\ folder.

Refresh your site in the web browser, and you are going to see the the first step of Magento installation. You need to proceed through the steps of the Magento installtion wizard that will ask you to generate your login details again, and when you are done, you’ll be able to login with these details to the backside admin.

*Some templates may have only dump.sql file. In such cases, please submit a ticket to our support team.

Import methods:

1) Form based upload: Can be used with any supported format, also (b|g) zipped files, e.g., mydump.sql.gz:

  • – Login to your cPanel
  • – Under the category “Databases”, click on phpMyAdmin
  • – Along the top of the screen click the “Import” tab
  • – Click browse under “File to Import” and locate the.sql file on your computer
  • – After you have selected the file, click GO and it will import your database

2) Form based SQL Query: can be used with the unzipped SQL dumps:

  • – log in to phpMyAdmin using your database username and password;
  • – unzip your .sql file, open it up in any text editor (like Notepad on Windows) and copy its content;
  • – In the main pane of phpMyAdmin click on the “SQLtab;
  • – Paste the content of your .sql file into the field under the “SQLtab;
  • – Click “Go” to begin the import;

When it has been successfully completed, phpMyAdmin will display “Your SQL query has been executed successfully: The content of your file has been inserted.”

Note, you can try both methods if there are errors after the import.

For more info on using the .sql files that come with the templates, please check the demo below:

Magento. Understanding sample data dump files

Themes for Magento
This entry was posted in Magento Tutorials and tagged dump, Magento, sample data, SQL. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket

Live Chat
We help you to choose the right product.