Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wp-secrets.php only gets generated when the volume is empty #36

Closed
nickjanssen opened this issue Oct 24, 2021 · 4 comments
Closed

wp-secrets.php only gets generated when the volume is empty #36

nickjanssen opened this issue Oct 24, 2021 · 4 comments

Comments

@nickjanssen
Copy link

Hi, wp-secrets.php only gets generated when the volume is empty. However, once the volume is there and the container has to restart for whatever reason (e.g. when moving a pod to another node on k8s) the wp-secrets.php won't be recreated since the volume already exists.

I think it should be passed with a separate volume instead.

curl -f https://api.wordpress.org/secret-key/1.1/salt/ >> /usr/src/wordpress/wp-secrets.php

@TrafeX
Copy link
Owner

TrafeX commented Nov 20, 2021

Hi @nickjanssen,

The idea is that /var/www/wp-content is mounted on a persistent volume, because there the plugins, themes and uploads are stored as well. You also don't want to re-generate the secrets because than you're not able to login WordPress anymore due to the changed salt.

@TrafeX
Copy link
Owner

TrafeX commented May 28, 2022

Hi @nickjanssen,

I'm going to close this issue due to inactivity. Let me know if you have any other questions!

@TrafeX TrafeX closed this as completed May 28, 2022
@mdbraber
Copy link

mdbraber commented May 31, 2023

@TrafeX wp-secrets.php gets downloaded when the volume is empty but when you start the container with a copied-over volume it isn't generated. It could make sense to always regenerate it when the container is started. A new wp-secrets.php means all users have to login again, which is actually a good precaution when rebuilding containers.

@TrafeX
Copy link
Owner

TrafeX commented Jan 1, 2024

See the latest updates in #42, the issue should be resolved. Thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants