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
- The remote request provider. In the example it’s
curl
, but you could usewget
or others as well - 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.