"Reload" Development Environment from wordpress_sites.yml

If there’s a database-specific setting, like admin_email, I want to change in my wordpress_sites.yml on the development version, how to I best reload that environment?

Or do I need to destroy the vagrant box and start over?

Is it on your development environment or your local vagrant box?

Have you considered using a wp-cli command or changing it manually?

It’s for my vagrant box, that is the development environment.

I guess I was trying to avoid WP CLI and rebuild the database from the .yml files. So I guess many settings in the .yml files are only for the very first time you setup the server…

I mean production env.

You should be able to just run the tags for the WordPress installation but you would need to edit your sites file. You could just $ vagrant ssh into your box then in your wp dir run $ wp db reset. When you load the frontend of the site it should display the WordPress installation.

I’m unclear why exactly you want to do this the long way. Is it something you want to automate? What have you tried?

In my mind it’s “cleaner” to go back and define something like the admin username from the .yml file than to edit the DB directly and have the .yml file be out-of-step with the DB… but I might be wrong there.

My fault for not getting it right the first time I suppose.

Ahh, then wp db reset is what you want. If you have a fresh install and don’t need your db at all and just want to start clean then do that. It will let you re-install WP from the 5 minute install.

But to also answer another question: run vagrant provision to re-run Ansible in development. It wouldn’t have worked in this case since it was a DB change though.