DEV Community

Cover image for Does it Make Sense to Run WordPress in Docker?

Does it Make Sense to Run WordPress in Docker?

Lukas Mauser on August 07, 2025

I've had my ups and downs with WordPress, I'm not a hardcore fan to be honest, but you can't deny it's popularity. You can use Docker to spin up ...
Collapse
 
ingosteinke profile image
Ingo Steinke, web developer • Edited

It makes sense, especially for development, when you have several different customer setups. What doesn't make sense is copy-and-pasting outdated code into a current post. Just why? If you'd taken two minutes to read the manual or open your code in any IDE, you'd know what's wrong with version: '3.8' and docker-compose.

But that's how clickbait posts (don't) work.

Collapse
 
code42cate profile image
Jonas Scholz

Calling something clickbait because it uses backwards compatible (!) things is slightly insane, but ok. We still see people use outdated docker compose versions everyday, would you prefer if they had a broken tutorial?

Collapse
 
ingosteinke profile image
Ingo Steinke, web developer • Edited

Backward compatibility is one thing. Okay, docker compose (v2) was released in 2020, docker-compose (v1) stopped being maintained in 2023, but v2 offers an optional hyphen syntax, so you have a point here.

Docker wasn't the reason for me to point out clickbait, but linking Sliplane in every other post was.

Thread Thread
 
xwero profile image
david duymelinck

I'm sure Lukas and Jonas can defend themselves, but as an outside voice I think their promotion is tasteful.

They provide posts with information that is useful. That is why I read their posts and react.
I know there will be a shameless plug for their product, but I think they do it in way it feels more like a gentle push than a slap in the face.

Thread Thread
 
code42cate profile image
Jonas Scholz

Appreciate it :D If you ever think its a slap in the face pls let us know! I also really appreciate Ingos feedback here:)

Thread Thread
 
ingosteinke profile image
Ingo Steinke, web developer • Edited

You all are right! I already thought about deleting my critical comment, but then again, it's good to discuss what is decent marketing combined with providing value and what isn't. Lukas' post surely is a legitimate post that adds more value to DEV than many other posts do these days.

Collapse
 
wimadev profile image
Lukas Mauser

Good catch 🤝

Collapse
 
code42cate profile image
Jonas Scholz

I usually ask the "does it make sense" question after spending 20 hours trying to dockerize something 😎

Collapse
 
wimadev profile image
Lukas Mauser

That's the natural way to do it :-D

Collapse
 
xwero profile image
david duymelinck

As a PHP developer I refuse to touch Wordpress. The architecture still has solid roots in their blog beginnings. The PHP code only is made compatible with new versions, no new code practices are being adopted. The guidelines are just outdated.

If you want to run an easy PHP CMS use Craft CMS or Statamic. If you want more modularity use Drupal or Sulu.

Collapse
 
wimadev profile image
Lukas Mauser

I accepted a few WordPress jobs when I was young and innocent that still haunt me to this day :D

As CMS I liked working with Directus.

Collapse
 
xwero profile image
david duymelinck

I think at this point ninety procent of all the CMS solutions are better than Wordpress. But their marketing is still strong.

I cringe when I see people build e-commerce, woocommerce.com/, solutions with Wordpress as the base framework.

Thread Thread
 
ingosteinke profile image
Ingo Steinke, web developer

You'll love WordPress after trying to use Webflow! And after using both, you'll never hold a grudge against React or any other framework that at least lets us write code than can be linted, versioned, and run in development and staging environments.

Collapse
 
anik_sikder_313 profile image
Anik Sikder

I’ve had similar experiences Docker felt overwhelming at first, but once I understood the networking and volume parts, I realized how powerful and repeatable it makes WP setups. Totally agree: for local dev or team-based environments, Dockerized WordPress is a game changer. Still, for clients who just want something that works, managed hosting wins every time. Appreciate the balanced view here!

Collapse
 
dre90 profile image
Dag-Roger

For local development of PHP check out DDEV