Sarathlal N

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

Recent Posts

  1. Remove edit, view, trash and quick edit links within posts list of admin screen - WordPress
  2. PHP Errors not displaying or not logging - LAMP server - Solved
  3. Display all hooks sequentialy that run on a page - WordPress
  4. Get downloadable files of a downloadable product - WooCoomerce
  5. Add actions based on WooCoomerce order status

Your Questions / Comments

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