We've been using Local by Flywheel[1] for a couple years w/o any issues but we just got a notification that it's being sunsetted in favor of Local[2]. We tried to follow their migration steps but kept getting errors so maybe we'll checkout Lokl.
It might be worth mentioning that Lokl [0] seems to be from the same author [1] as the "wp2static" plugin [2], my and many others go to for static site generation of WordPress.
I find Lokl and interesting take, although the usual self-serve script is kind of annoying for power users (what I mean is that this bash scripts tried to do everything for you and it's less transparent), I recommend the repo [4] as the source of the actual Dockerfiles, that you could just reference in something like a docker-compose setup.
The Dockerfiles are kind of surprising since they read more like a an ansible-playbook than like a Dockerfile. This one image has it all - php, nginx, mariadb, phpmyadmin and who knows what else [4]. It's an interesting approach to Docker images, certainly against the recommendation but might have some good reasoning for something as special as WordPress.
> The Dockerfiles are kind of surprising since they read more like a an ansible-playbook than like a Dockerfile. This one image has it all - php, nginx, mariadb, phpmyadmin and who knows what else [4]. It's an interesting approach to Docker images, certainly against the recommendation but might have some good reasoning for something as special as WordPress.
i can totally see why they would go that route, even if unconventional. those are all the tools necessary for a WordPress installation, and if you wanted to go the conventional route, you'd have to run each one in a separate container and use something like compose to bring them all together - which can be a little tricky to get your head around.
by contrast, having only one Docker image to deploy means no leeway for the developer to get anything wrong. it's a known-good distribution of all of the tools, pre-configured to work together with each other seamlessly.
I see it as a "simulation" of a shared hosting account which from what I experienced the most common deployment strategy for WordPress sites. Usually these hosting though still have the db on a different machine and are usually are exposed via Apache using php-cgi. But it's good enough.
They could throw in some non-root account as the last step for good measure.
All the other comments that are here now list alternatives. Has anyone compared these and can share some insights on pros and cons of are these pretty much equivalent?
Local WordPress development sounds like something I might want or need, but have not looked into yet. It would be great to hear what's out there, what's good, and what one should look out for.
Another alternative is wp-env, which is a small node wrapper over Docker. It’s meant to be very straightforward to use, though less powerful than other tools. It’s used for a lot of core editor development. You basically just have a JSON file pointing at whatever local source code you’re developing (or alternative options you need), wp-env start, and you’re good to go.
[1] https://getflywheel.com/design-and-wordpress-resources/toolb...
[2] https://localwp.com/