Published by Mijingo

movie icon image

EE Insider Blog

Spend your time learning and developing sites with ExpressionEngine and we'll use this blog to keep you informed of all the news related to ExpressionEngine and CodeIgniter.

» Read more in the Archives.

» Have a tip? Send us your EE news.

Learn ExpressionEngine Today

Over a series of 8 videos, watch and learn as Ryan builds an entire ExpressionEngine website from beginning to end. Get started now.

Seeding EE with Sample Data

On Twitter, Andy Harris asked about existing capabilities to seed sample data into EE:

I replied that I thought there was an add-on out there (apparently there’s not) and Greg Ferrell mentioned that he usually just creates a shell script to make that happen.

It would certainly be nice to have native functionality or an add-on that allows you to seed data into EE (I like the Ruby on Rails seed data functionality) from a file and also reset the entries based on the data in that file. This could be done with the Channel Entries API and I know some people have coded one-off solutions with the API to migrate data.

My suggestion to Andy was to use an XML file and the DataGrab add-on from brandnewbox:

He had the same idea. So, for now, DataGrab seems like the best option. Have you solved this another way? Let us know in the comments.

Posted on Feb 18, 2012 by Ryan Irelan

Filed Under: Development Tools

John Faulds15:48 on 02.18.2012

There is http://devot-ee.com/add-ons/proxy whose description says it was designed for this purpose but I haven’t actually used it.

Bryant16:00 on 02.19.2012

I wrote Proxy to handle this issue with sample data.  Its not a perfect implementation, it simply replaces channel entries data with your “pseudo data”, but its helped me quickly test templates without having to create a bunch of test entries

http://devot-ee.com/add-ons/proxy

Christy Collins11:36 on 02.20.2012

I’ve rarely had builds where it would be useful to seed data in this way. Usually it’s more important for me to test the data entry process myself, manually—and have the client do the same.  Building out an entry form and field structure that makes sense to the people who will be using it is an important part of the build, and something that definitely goes through iterations early on.