-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
[bitnami/wordpress] how to add define('WP_ALLOW_REPAIR', true) after first deployment #21659
Comments
For this deployment, I am using an external mysql DB to store data. There is also a volume allocated to the wordpress pod in the K8s cluster. I have several articles, plugins installed, users registered in my blog. If I cannot modify the setting of wordpress, is it safe for me to delete the helm chart and reinstall it? If I delete the chart, the volume will be removed automatically. Is there any data loss if the volume got deleted? |
Hi @xyfleet You could try the workaround below to customize the
helm install wordpress oci://registry-1.docker.io/bitnamicharts/wordpress
kubectl cp "$(kubectl get pod -o jsonpath='{.items[0].metadata.name}' -l app.kubernetes.io/name=wordpress)":/bitnami/wordpress/wp-config.php wp-config.php
kubectl create secret generic wordpress-config --from-file=wp-config.php
helm upgrade wordpress oci://registry-1.docker.io/bitnamicharts/wordpress --set existingWordPressConfigurationSecret=wordpress-config --set wordpressSkipInstall=true |
This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback. |
Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary. |
@juan131 Thanks a lot. After upgrade the chart with the secret, wordpress-custom-config, the pod was installed successfully. However, in the wp-config.php, there is no the new update,
But in the web portal of the blog, I found this. From the screenshot, I can see the max memory is 6,144 MB. Previous it was 512MB. Really confused. Not sure which one is right. Does my change take effective? Thanks, |
Hi @xyfleet
Did you check its content in this path:
Please note you're not limiting PHP memory, see https://wordpress.stackexchange.com/questions/131179/php-memory-limit-vs-wp-memory-limit |
@juan131 Based on what I found that the wp memory limit must be less than php limit, my setting (memory limit 6G) is not gonna work when the php limit is only 512MB. So, what configuration should I have here for memory limit? |
One more question here: |
Hi @xyfleet
If you have any questions about the application itself, customizing its content, or questions about technology and infrastructure usage, we highly recommend that you refer to the forums and user guides provided by the project responsible for the application or technology. They'll provide better advisement about the memory limits to set for both WordPress and PHP.
The data However, when the No symbolic link is created and the |
@juan131 Thank you so much. Really appreciate it. By default, the php memory limit is 512MB. Even I configure How can I try to modify the php memory limit? I see the php.ini under /opt/bitnami/php/etc. Looks like in the values.yaml, there is no parameter for php.ini. (I want to know if there is any workaround I can do similar as you mentioned for wp-config.php.) |
Hi @xyfleet Try setting the extraEnvVars:
- name: PHP_MEMORY_LIMIT
value: "1G" We also recommend to browse the existing issues, it's very likely that this kind of questions have been previously answered. For instance, this particular topic was covered at #6310 (comment). Thanks! |
@juan131 Thanks a lot. 👍 |
Name and Version
bitnami/wordpress 18.1.29
What architecture are you using?
amd64
What steps will reproduce the bug?
1: install the wordpress by helm chart
After the first deployment, I want to add the WP_ALLOW_REPAIR' into the existing wordpress pod
2: I updated the values.yaml file in the chart and applied.
3: however in the pod, I did not see the new configuration(
define('WP_ALLOW_REPAIR', true);
), in the file, wp-config.php. Looks like the change did not take effect in the pod
Are you using any custom parameters or values?
What is the expected behavior?
After we adding,
define('WP_ALLOW_REPAIR', true
, I should be able to access the repair page:http://your-site.com/wp-admin/maint/repair.php".
What do you see instead?
Not able to access this page.
Additional information
After the first deployment, can I use these the parameters,
wordpressExtraConfigContent
to configure the wordpress pod? Do I have to completely delete the wordpress and re-install the chart with this changewordpressExtraConfigContent
at the same time?The text was updated successfully, but these errors were encountered: