How to create your own demo/test content (dummy data) for WP?
In this note, we will talk about how to fill a site with demo data for testing a theme.
Sometimes it is necessary to test a theme, but you don't want to sit and add texts, images, taxonomies, and other content to WordPress to check the layout, data types, and more.
HOW can you create your own test content (demo/trial content-dummy, which will show how the theme looks with all possible data types and different text formatting)? In other words, you need demo content that can be quickly loaded into the database, containing images, videos, various text formatting, etc.
Widgets Testing
To test the display of widgets, a simple plugin called Monster Widget has been created. The plugin allows you to quickly and easily add all existing widgets to the sidebar for testing.
Solution: test data importing
To achieve this quickly, you can import ready-made test content.
There are special .xml files for this:
- Basic content formatting: https://github.com/WordPress/theme-test-data/blob/master/theme-preview.xml
- A lot of data: https://github.com/WordPress/theme-test-data/blob/master/themeunittestdata.wordpress.xml
Original repository on Github: https://github.com/WordPress/theme-test-data
This is a special file created by WordPress developers for testing content display. It contains information with posts, pages, comments, categories, and other content.
To import this file, use the special plugin WordPress Importer.
Step-by-step instructions - creating demo content for WordPress
-
Download one of the data files for import:
-
Go to the admin panel:
Tools > Import.Select the type of import "WordPress" (click on the link).
You are prompted to install the import plugin - install it. Click on the link
WordPress. The import plugin is installed, and now import is possible. -
Next, select the downloaded file
themeunittestdata.wordpress.xmlfor import. Import it.Select users and check the box: import files:
-
Done!
Now we have created different types of records:
- scheduled.
- drafts.
- sticky.
- password-protected.
- with comments.
- with pings.
- with different length titles.
Also, different records contain different content to check how they will look:
- lists.
- tables.
- images.
- quotes.
- code blocks.
- special characters.
- pagination.
- different HTML markup.
- etc.
There is almost everything that can be on the site.
Also, categories have been created:
- with different headings.
- with and without description.
- nested into each other.
Also, different images have been uploaded to the entries.
--
Perhaps this is not exactly what you need because there is not much content here, but it is all different and is designed to check all possible options for displaying standard content.
If you need a lot of content (posts) to test the site's performance, you can use my code to add a bunch of similar content.



