Import Unit test data on All sites of WordPress multisite with WP CLI

black laptop computer turned on showing computer codes
Photo by Markus Spiske on

In case you need to test multiple themes with same plugin you are higly likely create a multisite for comparison or ease of testing

Install WordPress Importer plugin

wp plugin install wordpress-importer --activate-network

Get Latest xml file from Theme Unit Test page

Change to Upload directory


Now use this following command

wp site list --field=url | xargs -n1 -I % wp import ./themeunittestdata.wordpress.xml --authors=create --url=%

By milind

Milind is a Senior WordPress Engineer at rtCamp. WordPress Ecosystem Contributor and AMP Support Engineer.

Leave a comment

Your email address will not be published. Required fields are marked *