Development environment / auth_salt

Hi,

It looks like when using woocommerce and setting certain settings in the Paypal Flow – woocommerce encrypts those values in the woocommerce_paypal_pro_payflow_settings row of the wp_options table using AUTH_SALT and SECURE_AUTH_SALT. I’m trying to have parity with my development and staging environment so I don’t have to keep filling in those settings.

So specifically omy development environment I’m trying to figure out how to set

  auth_key:        
  secure_auth_key: 
  logged_in_key:   
  nonce_key:       
  auth_salt:       
  secure_auth_salt:
  logged_in_salt:  
  nonce_salt: 	

– is it just editing the vault.yml underneath the development folder? Is there anything I need to do aside from restarting my vagrant instance to get these to be recognized?

Is there a way to verify AUTH_SALT and SECURE_AUTH_SALT are set in my development environment?

Thanks,

Neil

:white_check_mark: yes (under env within vault_wordpress_sites)

No Vagrant restart needed to apply changes to .env file.

  • For Vagrant dev, need to run wordpress-install role:
    ANSIBLE_TAGS=wordpress-install vagrant provision

  • For staging and production, just redeploy

A few related links for background:

https://discourse.roots.io/t/connect-to-mysql-using-sequel-pro-when-there-is-already-a-mysql-in-local/9409/6

2 Likes

@fullyint beat me to it on the other stuff, but you can also see your salts in WP by going to http://dev.url/wp/wp-admin/options.php

2 Likes

Thanks for clarifying that helps a lot and thanks for the webpage so I can see all the settings are set!

Where and how do I run the wordpress-install role with those ANSIBLE_TAGS?

Run this command in the same directory as you run vagrant up, your trellis directory. This command is just vagrant provision, which runs the Trellis dev.yml playbook for you, but sets the ANSIBLE_TAGS environment variable just for the duration of this command.

Ansible tags are a means to running just a portion of the playbook, e.g., just the wordpress-install role that creates the .env file. If ANSIBLE_TAGS is set, Vagrant will pass those tags to Ansible and the dev.yml playbook. It is not required to use ANSIBLE_TAGS, but it saves time when you only need to run 1-2 roles instead of the whole dev.yml playbook.

Thanks that makes sense.

Thank you!!