How could one change the WP version?
XedinUnknown opened this issue · 4 comments
I now use docker4wordpress, and in many ways it's working great. However, one of the reasons I use it is because I want to parallel-build my product with multiple version of both PHP and WP.
From what I see in this repo, the version of WP is determined during build (just like PHP), but there are only containers with 1 version of WP: the latest one. Is there a way to build on multiple, and if so - how?
You can mount your own codebase with wordpress-php image. For codebase you can use composer project https://github.com/wodby/wordpress-composer where you can modify the core version.
You can mount your codebase if you have a codebase. But in most cases it is unnecessary, because the codebase is unlikely to change. In environments like CI/CD, you do not have a codebase, but only what is in your Docker environment. That's the whole point of having a container: to have everything you need in it, so that it works the same way everywhere, e.g. locally, on test, and on live.
So, I'm not sure why this issue is closed, since your comment does not answer the question.
If you don't want to manage your codebase you can rebuild this image with the docker build param WORDPRESS_VER
. You could also find older versions among stability tags but those images most likely built on outdated PHP versions and miss other fixes.
I've closed this issue because your question sounds like a generic docker question (Dockerfile
has all the answers) and there are better places (like SO) for generic support requests.
That's the thing, though: rebuilding is not what is needed for cases like mine, which are pretty common. Usually, you have a product - a plugin or theme. And you want to make sure it works with all target versions of WP and PHP. Of course, you should use CI/CD for that. I was hoping that your (quite comprehensive) suite of images and configurations would cover this rather standard scenario. But re-building is not a solution, because when building the plugin/theme, you can't re-build the image as well. Therefore, it has to be a run-time thing.
Sounds like a pretty specific problem to me, though.