wp-cli import theme sample data

I just filed to a PR to the WPTest.io “theme test data”. In short it’s the following series of commands. You just have to replace

  1. The remote request provider. In the example it’s curl, but you could use wget or others as well
  2. The remote request target. In the example it’s the wptest.io XML/WRX file.

Code:

#!/bin/sh

# @TODO automate things like changing folders, chmod/permission, etc.

curl -O https://raw.githubusercontent.com/manovotny/wptest/master/wptest.xml
wp import wptest.xml --authors=create
rm wptest.xml

where wptest.xml is the filename and of course you should run it from within the target folder.

Leave a Comment