Installing a fresh OpenCart 2 website with an empty and clean default store – UPDATE
Today I installed Opencart 220.127.116.11 on one of my customer’s servers. Everything went fine and the installation proces was very easy. When the installation was done, I went to take a look at the demo store and noticed all the demo data. I think this is nice to have when you just get started, to see what you can do with the software, both for developers and clients.
I noticed that it’s quite hard to delete all the dummy data in the default store, set in place by the installation. I tried purging the SQL tables, but I did not know which ones I had to delete. I also tried to create a new store in the admin panel (System -> Settings) and make that the default store but I did not find an option to do so.
Eventually I ended up modifying the seed SQL database that comes with the installation. I went over all INSERT INTO statements and checked if I thought the would be necessary. I ended up leaving out the following dummy data tables:
- Product Attribute
- Product Description
- Product Discount
- Product Image
- Product Option
- Product Option Value
- Product Related
- Product Reward
- Product Special
- Product To Category
- Product To Store
- Url Alias
- Voucher Theme
- Voucher Theme Description
- Attribute Description
- Attribute Group
- Attribute Group Description
- Banner Image
- Banner Image Description
- Category Description
- Category Path
- Category To Store
Here are the steps I took after I installed Opencart and removed the install folder:
- In the original install folder, located on your pc, modify opencart.sql (you can download my file below)
- re-upload the install folder to your server
- rename /config.php and /admin/config.php to /config-dist.php and /admin/config-dist.php respectively
- delete all the tables in your database
- visit your domain i.e. http://yourdomain.com/setup/index.php to re-install Opencart
- once the installation is complete, you’re ready to go and use Opencart 2 with a clean and empty database
If you haven’t yet installed Opencart then just copy and paste my modified opencart.sql file over the existing file inside the install folder before uploading your files to the webserver.
Steve Engratt has informed me that version 2.1.x introduced some schema changes which requires an updated sql-file.
Here’s what has changed:
TABLES ADDED TO 2.1.x SCHEMA
TABLES REMOVED FROM 2.1.x SCHEMA
Steve has also been so kind to supply me the updated SQL-file. Thank you!
Download the latest version here:
If you’re still looking for the older version: