Install theme unit test data using WP-CLI - WordPress

The theme unit testing is an essential act in WordPress theme development. When we make a new WordPress theme or starting a new WordPress project, it must be our first task after the WordPress installation.

It is too simple.

  1. Download theme test data
  2. Add & activate WordPress Import Plugin
  3. Import the test data.

Below you can find the WP-CLI commands for all of the above tasks.

curl -O
wp plugin install wordpress-importer --activate
wp import ./theme-unit-test-data.xml --authors=create
rm theme-unit-test-data.xml

Need Help?

Do you need any help on WordPress? I'm happy to help you.

Contact Me

Recent Posts

  1. Update query order - WordPress
  2. Display featured products - WooCommerce
  3. Remove "Category:", "Tag:", "Author:" from the_archive_title - WordPress
  4. The essential & basic WP-CLI commands for a WordPress developer
  5. A basic Samba server on Ubuntu

Questions / Comments

If you found this article interesting, found errors, or just want to discuss about them, please get in touch.