DEV Community

Cover image for Wordpress in docker is slow ... I have a solution for that!
Rafał Piekara
Rafał Piekara

Posted on

Wordpress in docker is slow ... I have a solution for that!

Docker WordPress is slow, terribly slow. But I have a way.

See one simple trick! WordPress and Docker haters hate it!

In docker-compose.yml, in the place where we configure the volumes, we will add the flag :delegated.



    volumes:
      - my_wordpress_db:/var/lib/mysql:delegated

###
    volumes:
      - ./wp-content:/var/www/html/wp-content:delegated


Enter fullscreen mode Exit fullscreen mode

These two sites in
docker-compose.yml
do the job. It is possible to work, even quite comfortably 💪🐳

WordpressDocker

Top comments (4)

Collapse
 
adamja profile image
adamja • Edited

Looks like this delegated flag has been made redundant with how docker now manages it's filesystems:
forums.docker.com/t/what-happened-...

I didn't notice any performance increase when setting it...

Collapse
 
rafalpiekara profile image
Rafał Piekara

What operating system are you working on? I've been using this on MacOS. Possibly on Windows or Linux there is no problem with Docker and Wordpress performance.

Collapse
 
adamja profile image
adamja

I am on Windows 10 at the moment. I did try it out but I didnt notice any difference in performance :(

I am now running it locally with xampp control panel. It is a lot quicker than when I was hosting it with Docker. I'd like to know how to fix it, but already wasted too much time on it...

Thread Thread
 
rafalpiekara profile image
Rafał Piekara

Running Wordpress locally is always tricky...