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

  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.



# @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.

  • thanks so much :) did u ever try to go any further? like get keys for reCaptcha or a key for BruteProtect? – Wowzaaa May 16 '14 at 23:11
  • @user2030809 you are welcome. What do you mean by "got any further" and what about "keys for reCaptcha" or "key for BruteProtect"? – kaiser May 17 '14 at 0:06
  • BruteProtect and reCaptcha are 2 of the - let's say - most popular plugins to help protect a wp ... but in order to use them u need to generate keys for each domain on external links and save those keys in ur wp instance ... these are steps that can be automated ... thought u tried it already and u can help me save some time :) – Wowzaaa May 17 '14 at 1:33
  • @user2030809 That's a separate question about bash/shell: how to fetch remote content and save it into a file. You might want to take a look at Vagrant and a proper provisioner like Puppet, Ansible, Chef or Salt and ask this on Server Fault or Stack Overflow. – kaiser May 17 '14 at 10:33
  • The only thing I would add, as suggest by wp-cli is: wp plugin install --activate wordpress-importer – Nabil Kadimi Aug 19 '17 at 19:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.