[wp-trac] [WordPress Trac] #48050: Development Build: Provide structure to auto-install plugins

WordPress Trac noreply at wordpress.org
Thu Jul 31 15:47:37 UTC 2025


#48050: Development Build: Provide structure to auto-install plugins
------------------------------------+------------------------------
 Reporter:  kraftbj                 |       Owner:  (none)
     Type:  enhancement             |      Status:  new
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  Build/Test Tools        |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:
------------------------------------+------------------------------

Comment (by callumbw95):

 Hi everyone,

 Adding a thought to this, even though as the underlying goal remains very
 relevant for modern development workflows, and would be very useful in
 helping invite more people into the community of contributors.

 A powerful and common pattern for solving this today is to fork the
 official WordPress Docker image and create a custom development
 environment. One can create a Dockerfile that uses the official image as a
 base and then executes WP-CLI commands during the image build process to
 install and activate a standard suite of testing or development plugins.

 For example, a developer's Dockerfile could include:

 Dockerfile
 {{{
 FROM wordpress:latest

 # Switch to root to install dependencies if needed, then switch back
 # For the official WP image, WP-CLI commands should be run as the www-data
 user.
 # Install and activate a suite of useful development plugins
 RUN su www-data -c "wp plugin install query-monitor user-switching debug-
 bar --activate"

 # You could add other development tools or configurations here
 # For example, copying a custom php.ini for debugging
 # COPY --chown=www-data:www-data dev-php.ini /usr/local/etc/php/conf.d/
 }}}

 By running docker build with this file, a developer can create a custom
 image with Query Monitor, User Switching, and other tools pre-installed
 and ready to go. This approach is:

 - Declarative: The Dockerfile itself serves as the version-controlled list
 of dependencies.

 - Reproducible: Every developer on the team gets the exact same
 environment.

 - Comprehensive: It goes beyond just plugins and can manage PHP
 extensions, server configurations, and other dependencies.

 This container-based workflow effectively solves the problem described in
 the ticket and is a widely adopted best practice. It might be one of the
 reasons a dedicated Core feature for this has not gained more traction,
 but would love to hear any feedback about this solution.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/48050#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list