i am trying to create an automated process of installing a wordpress site from scrach (no db, no user, no files, no settings) to the point were the site is up and it has it’s own custom theme with the sample data imported
so i have 2 questions
1) wp-cli can help me do all this except importing the sample data xml that comes with the themes … can anyone help me with a solution for this?
2) does anyone know of any attempt to automate the installation process of a wp site?
thanks,
Rares
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 use wget
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.