OlivPi
January 17, 2025, 3:55pm
1
Hello,
I don’t find the answer to the good way to modify vault.yml
in the development folder for exemple.
# Created by trellis-cli v1.13.0
# Documentation: https://roots.io/trellis/docs/vault/
vault_mysql_root_password: uGLPwAEibujaYmg71npaKHl2pXTTbxCjVSAQoQdzddNKux5B0uZFXNPb6CSL1SCd
vault_wordpress_sites:
hotel-outa.com:
admin_password: 20cyG0mJCOTb2ikPqmV5DxQ6Jm8bWI9mclrB4D7U6o9gFsRfe5VHp9Un9LRNGlfj
env:
db_password: wSvLdQGFu1OChLFv8yN2cpYI7li4lsF0m0CLBfzdH1fHWk79wMRjFuBcVyRclZhn
auth_key: EOcjmAxMgWMTw7eEGIAIZXveG8Nz3JL8KQAecVEq2Ox2z0HXewX8cpM1lthGp5Up
secure_auth_key: Qh2zbj2I87XRs7RhhAiL6CxqKjSkvuMhYOTSDxkah2AbPIJHZ5IfUPIM2fAsTFtm
logged_in_key: iHBKUtYE7Rz9XUJYguNIDuOhA2qFAnASdheOUP6QkmyFqgpnR3EFi0yVyN5xKIJS
nonce_key: 802HMobrPkvidWu8lffWmnqNtxjKWKaTQhygpY7vtcY3YLocbdk6lBza4ArC3aP6
auth_salt: BJvWNqXgKikyh8l2wxSw5diaE7mRpQLyDdPUWKH5Z6PzyIiHDwqv9pp1pSPhmnxw
secure_auth_salt: hwTcwEcPKC533hEMle0SEDdpirfH09TSvaG4yElzvLcc2aHViVwSkECeiZW8AZlj
logged_in_salt: IlKqcscfLrQFEewS1OccdAznxe8HWfXIDdCAoQ9SrPjCfLQoxcOHvDL7dFODamKy
nonce_salt: tz1YDFStOitdX8kKuk7yGUi7Poy80SehIKTLCP3Ag5MjmHXrRVcFnADc7X4qKFhR
All of values are hash/salt. So how i could find or change the admin_password
? because i test in command line trellis provision
but nothing change. What is the best way ? I probably forgot a step ? There are the documentation, but i didn’t see the solution.
For information, i am on MacOS.
Thanks !
Did you follow this documentation for encrypting/decrypting: Vault | Trellis Docs | Roots ?
If I haven’t missed a major update, as far as I know the whole vault.yml
file should end up encrypted, not just the row values.
OlivPi
January 20, 2025, 11:00am
3
Sure !
But i see with provision’s log the informations updates, and this not work. I have forgot something ?
TASK [wordpress-install : Setup Permalink Structure] ***************************
skipping: [default] => (item={'changed': False, 'stdout': 'WordPress is already installed.', 'stderr': '', 'rc': 0, 'cmd': ['wp', 'core', 'install', '--allow-root', '--url=http://****-****.test', '--title=****-****.com', '--admin_user=admin', '--admin_password=admin', '--admin_email=admin@****-****.test'], 'start': '2025-01-20 07:56:14.572238', 'end': '2025-01-20 07:56:15.172448', 'delta': '0:00:00.600210', 'msg': '', 'invocation': {'module_args': {'chdir': '/srv/www/****-****.com/current/', '_raw_params': 'wp core install --allow-root --url="http://****-****.test" --title="****-****.com" --admin_user="admin" --admin_password="admin" --admin_email="admin@****-****.test"', '_uses_shell': False, 'expand_argument_vars': True, 'stdin_add_newline': True, 'strip_empty_ends': True, 'argv': None, 'executable': None, 'creates': None, 'removes': None, 'stdin': None}}, 'stdout_lines': ['WordPress is already installed.'], 'stderr_lines': [], 'failed': False, 'item': {'key': '****-****.com', 'value': {'site_hosts': [{'canonical': '****-****.test', 'redirects': ['www.****-****.test']}], 'local_path': '../site', 'admin_email': 'admin@****-****.test', 'multisite': {'enabled': False}, 'ssl': {'enabled': False, 'provider': 'self-signed'}, 'cache': {'enabled': False}}}, 'ansible_loop_var': 'item'})
skipping: [default]
OlivPi
January 20, 2025, 4:37pm
4
I find my solution
I reset the password via WP-CLI
Access your virtual machine using Trellis CLI :
bash
CopierModifier
trellis vm shell
Navigate to your WordPress site directory inside the VM:
bash
CopierModifier
cd /srv/www/hotel-outa.com/current
Reset the password for the admin user (replace “your-new-password” with your desired password):
bash
CopierModifier
wp user update admin --user_pass="your-new-password" --allow-root