Setting Up WordPress image with Plugins

Hi there,

I have setup the WordPress image but I would like it to also include themes and plugins, I see the guide in the WordPress page but not sure how to implement it in the code.
Wordpress - Official Image | Docker Hub

Include pre-installed themes / plugins

Mount the volume containing your themes or plugins to the proper directory; and then apply them through the “wp-admin” UI. Ensure read/write/execute permissions are in place for the user:

  • Themes go in a subdirectory in /var/www/html/wp-content/themes/
  • Plugins go in a subdirectory in /var/www/html/wp-content/plugins/

If you wish to provide additional content in an image for deploying in multiple installations, place it in the same directories under /usr/src/wordpress/ instead (which gets copied to /var/www/html/ on the container’s initial startup).

But what does this subdirectory look like? I can’t see any example images of WordPress that also include themes and plugins…

Many thanks


Because it is not something that Docker will handle. You just need to mount the folders or copy them into the image. You can find examples in the image description for copying themes.

If you don’t know what you should copy, you can search for it in the Wordpress documentation, but I admit, I tried and if I didn’t know it, it would not be clear. What you can try is to install a wordpress, go to the Web admin dashboard, install a theme and check the folder from the terminal. Basically you need to download a theme, extract it and move the whole folder to the “themes” folder of Wordpress.