WordPress Bits

Hacking WordPress. Keeping the bits together.

Tip #1 : Lorem Ipsum – the king of test data

Posted by Leonid Mamchenkov on August 14, 2007

(With this post I’m starting a new category – WordPress Tips. It should carry small posts which make a life of WordPress hacker easier. If you have a tip, please let me know. )

While developing WordPress sites one often needs some test data. Sample blog posts, pages, comments, and thinks like that. When done manually, one often uses “this is a test” or “blah blah” sort of things. These are often too short, and longer version take too much time produce. There is a better way. It’s called “Lorem Ipsum“.

There are several tools online which generate Lorem Ipsum texts for you. However I found that Dummy Lipsum Firefox extension works best for me. Install it, restart your Firefox, right click over any text area, and select “Insert Dummy Lipsum“. Here is a sample of what you’ll get.

Aenean et risus eu purus porta aliquam. Proin rhoncus ornare elit. Donec leo dolor, posuere quis, mattis sit amet, pharetra id, pede. Proin nonummy vulputate augue. Cras mollis pretium pede. Sed consectetuer eros feugiat velit. Pellentesque elit. Curabitur nec dolor mattis sapien imperdiet mattis. Nam interdum ipsum. Sed tortor lacus, feugiat non, sollicitudin quis, interdum vel, purus. Proin ultrices ligula vel augue. Proin augue arcu, accumsan porta, fermentum sed, aliquam vitae, magna. Donec mauris metus, blandit a, egestas vitae, feugiat quis, risus.

About these ads

27 Responses to “Tip #1 : Lorem Ipsum – the king of test data”

  1. cimddwc said

    Good idea, this tips category.

    You know what’s odd? People are actually using long lorem ipsum texts as search phrases with Google etc. I’ve found some with over 800 characters in my logs…

  2. Cimddwc,

    now that’s weird. But what’s even more weird is that a text over 800 characters matched… classics, eh? :)

  3. kingrat said

    One thing that I’ve been looking for is a way to test a WordPress installation. In other words, a way to have a duplicate installation that is as close to my final production setup as possible. When I worked at a big internet retailer, we used the same scripts to install our test environment as our production environment, and then had what we called override scripts to make the few changes needed to run the test site separately (e.g., http://internaltesturl/ overwrote http://bigsite.com/ in the DB).

    I’d love to see something like that for WordPress, and i haven’t seen it.

    Generating test data like you mention is only a small part of testing an installation, and easy to do without an extension. I have a text file I just cut and paste when I need it.

  4. Skeddy said

    It would be nice if there was a script that generated the same kind of test data that you see on the Theme Viewer – lists, image in a post etc etc.

    If I’m working on a test site locally, I always have to fill in some dummy data, so that I can check how the theme looks.

    Surely in can’t be that hard? I thought I’d read somewhere about how you can edit the db_schema.php file to change the default test post?

  5. handy – I usually use the generator (I think its the first site at the Google search you linked to) but that FF extension will be handy!

  6. Kingrat,

    you can use wp-config.php to do all the magic for this task. One approach is to use the newer WP_HOME and WP_SITE settings.

  7. Skeddy,

    you can use a customized install.php file to provide your own defaults. WordPress does make a first page, post, comment, and blogroll for you, when you install it. You can change that behavior, so that you have your own data.

  8. cimddwc said

    It wasn’t actually an exact phrase in quotes, so the order of the words (or other words in between) didn’t matter – and Google uses the first 32 words only and ignores the rest.

    BTW, your paragraph yields only a few results, probably because it doesn’t start with the usual “Lorem ipsum dolor sit amet, consectetuer adipiscing elit” – which Google finds over 2 million times…

  9. Cimddwc,

    I’m treating Lorem Ipsum as a random text, but I probably shouldn’t. It’s not just a bunch of random characters thrown together into words… One day I should think more about it, but not today. :)

  10. sunburntkamel said

    lorem ipsum is decent, but you should always work with several formatted types of lorem ipsum. the Formatted WXR export from the sandbox competition is a good example.

  11. sunburntkamel,

    excellent point! Thank you.

    I do often forget about testing formatted content, as I am not the one doing the “visual” work. Making a set of formatted pages and posts sounds like a good idea for local testing.

  12. Harry said

    I prefer to use chunks of classic novels, now that they’re all available online.

  13. Jonathan said

    I’ve been using lipsum for a few years now. I’ve found http://www.lipsum.org to be the easiest so far.

  14. Harry,

    While there are, of course, many great chunks of text to use for testing, I think that locating and copy-pasting them takes way too much time. Auto-generated stuff is faster and suits the purpose just fine.

  15. ineation said

    Good tip Leonid,
    I was using the site http://www.lipsum.com/ and I’ve discovered that the firefox extension uses this site to generate the text. But now it is far more easier to use it… Thanks again.

    While we are talking of good firefox extension, I guess you all know the web developper tool bar. Such a great extension…

    Bye all !

  16. Ineation,

    the topic of Firefox extensions is very tempting. I’ll try to stay away from it for as long as I can, then I’ll do one post, because I won’t be able to avoid it forever, and then I’ll have an excuse not to post about it ever again… Otherwise it’s too easy to start reviewing all those excellent Firefox extensions and forget about the real purpose of this blog. :)

    WordPress plugins is another topic like that, but I’ll treat it differently.

  17. Robert said

    I like to use this text generator:
    http://www.malevole.com/mv/misc/text/
    It’s different and sometimes amusing.

  18. [...] Tip #1 : Lorem Ipsum – the king of test data (With this post I’m starting a new category – WordPress Tips. It should carry small posts which make a life of […] [...]

  19. [...] Tip #1 : Lorem Ipsum – the king of test data (With this post I’m starting a new category – WordPress Tips. It should carry small posts which make a life of […] [...]

  20. Lorna said

    Wonderful, a Firefox extension! Like Ineation, I’ve been using the online generator at lipsum.com all the time for my web design projects, but the extension makes it a few steps easier now.

  21. [...] Tip #1 : Lorem Ipsum – the king of test data (With this post I’m starting a new category – WordPress Tips. It should carry small posts which make a life of […] [...]

  22. Leonid, actually lorem ipsum goes back a few centuries, to the early days of printing. Seems this printer — funny, but the original company that created PageMaker (recently killed off by Adobe), honored him by using his name as the company name — wanted text to use for samples that people would not stand about reading. He wanted his customers to focus on the look of the typeset material, something that had to be done manually back then, as was done, including in some small print shops, to this day.

    I am on my laptop right now and don’t have all my bookmarks. In a quick Google search, I found
    http://design.weblogsinc.com/2004/05/14/lorem-ipsum-and-greeking-facts-history-freebies-downloads/, which gives a fair background on the text, but not the full story. There’s a site, based out of Australia, if I remember correctly, for folks who use PageMaker, InDesign, and yes, even QuarkXPress. I will try to remember to get the links for you.

  23. Dave,

    yeah, I’m somewhat familiar with the story from the Google search results and Wikipedia page linked from the post, but it’s always fun to read the history of such things, so, sure, share the links. :)

  24. dima said

    Sanks ! Good article & good site

  25. [...] Tip #1 : Lorem Ipsum – the king of test data by [...]

  26. [...] Lorem Ipsum – the king of test data [...]

  27. Ritzy said

    Hi .. I am also a wrodpress user & yes .. I agree .. lorel ipsum is the king of test data. Very useful :)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.

Join 39 other followers

%d bloggers like this: