Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
Recommended
WordPress Plugins
View all Guides

How to Add Dummy Content for Theme Development in WordPress

Last updated on by
Elegant Themes
How to Add Dummy Content for Theme Development in WordPress

It makes us very proud to hear that our WordPress tutorials inspire many readers to consider developing their own themes. For the users who just want to tweak their themes, we have a WordPress theme cheat sheet. However, some of our readers want to go beyond that and create their own themes from scratch. One such user recently asked us how to add dummy content in WordPress for theme development purposes. They were using a plugin to add dummy posts in WordPress, which is not an ideal solution. In this article we will show you how to add dummy content for theme development in WordPress using theme unit test data.

What is WordPress Theme Unit Test Data?

Theme unit test data is an XML data file that contains dummy content for WordPress theme development. It is used by WordPress theme developers to test their themes. It is also used by WordPress theme review team to test the themes for inclusion in WordPress theme directory.

When creating a WordPress theme, there are a number of things that you need to consider such as images, links, widgets, post formats, galleries, lists, comments, page navigation, etc.

You need to make sure that your theme is ready for all these elements that a typical WordPress site is supposed to handle. Theme unit test data helps you test your themes for HTML tags, formatting, navigation menus, comments, widgets, etc. This allows you to create a theme that is truly compatible with WordPress. It is extremely important to test your theme with theme unit test data when you are planning to publicly release a theme.

Dummy content needed for theme development in WordPress

Adding Dummy Content Using WordPress Theme Unit Test Data

First you need to download the XML file for theme unit test data. Go to Tools » Import in your localhost development environment. On the Import screen, click on WordPress and a new popup window will appear asking you to install the WordPress importer plugin. After installing and activating the plugin, you will be redirected to the importer asking you to upload a WXR (.xml) file.

Upload the XML file you downloaded earlier. On the next screen select the authors you want to import and download attachments. The importer will now import the data from XML file to WordPress. Once it is done, preview your site to make sure that all new content is there.

What’s Included in Theme Unit Test Data?

Everything that you would need to test your WordPress theme is packed in theme unit test data. It has categories, child categories, menu items, nested comments, pages, sub-pages, images of different sizes, image alignment, etc. There are lists, blockquotes, links, code, and other HTML tags that you should style in your themes. It is a comprehensive set of dummy data which is far better than using a dummy content generator plugin for WordPress.

We hope that this article helped you add dummy content for theme development in WordPress. If you have any questions or feedback, then please leave a comment below. Also don’t forget to follow us on Google+.


Editorial Staff at WPBeginner is a team of WordPress lovers led by Syed Balkhi. Page maintained by Syed Balkhi.

WPBeginner's Video Icon
Our HD-Quality tutorial videos for WordPress Beginners will teach you how to use WordPress to create and manage your own website in about an hour. Get started now »
  • Ahmed Yosry

    Thanks

  • shruti

    i did as told but on uploading it shows this message
    Failed to create new user for themedemos. Their posts will be attributed to the current user.
    Failed to create new user for chipbennett. Their posts will be attributed to the current user.
    Failed to create new user for lance. Their posts will be attributed to the current user.
    Failed to create new user for emiluzelac. Their posts will be attributed to the current user.
    please help as I cannot see any dummy post in my wordpress except form hello world.

  • mohsin

    This is great and awasome! Thanks!

  • Etienne

    Thanks !

  • Kraemon

    Thank ya

  • Chris Rouse

    WP Test (http://wptest.io/) is a really thorough set of test data for everything in WordPress.

  • ifan

    cool!

    i will use it.

    but after development is done.
    is there simple way to delete all dummy contents?

    • http://www.wpbeginner.com/ WPBeginner Support

      if its an empty installation with just the dummy content then you can reset your WordPress database to default settings. But if it has other content that you do not want to delete, then back up it first.

  • Sü Smith

    This is great! Thanks.

  • Elliott Richmond

    Theme unit test data is awesome, I’ve only recently started to use it and its a true life saver – gone are the days of waiting for css issues to be discovered, you can nail them all in one hit!