I've been trying to create an Ansible playbook to install Wordpress. Most of the online documentation I've read, about installing Wordpress via the command-line points to WP-CLI. Question is, aside from WP-CLI, is there a method to install Wordpress via the command-line. Here's what I've completed thus far:

  1. wget https://wordpress.org/latest.tar.gz
  2. tar zxf latest.tar.gz
  3. fix the permissions of the wordpress files/directories
  4. copy the wp-config.php file to the new WP install directory

This takes care of setting up the wp-config.

However, is there a method to implement wp core install and wp core config, to add the admin user/admin password/site title/admin email, without the use of wp-cli via the command line?

  • it is possible but not fun. why can't you use wpcli? it is the much easier option as in the end you will need to replicate its functionality – Mark Kaplun Mar 28 '17 at 8:23
  • I would use WP-CLI, it's very good - not just for the initial install but for installing plugins/themes, creating standard pages, etc. You can run the wp commands under Ansible. Also - why are you writing a new playbook to install Wordpress when there are many pre-tested roles in Ansible Galaxy? You can get most of the installation done with those, then install WP-CLI and use it to tweak setup. – RichVel Jul 31 '17 at 8:56

Your Answer

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

Browse other questions tagged or ask your own question.