creativecommons / index-dev-env

Local development environment for CreativeCommons.org (product name: index)
Creative Commons Zero v1.0 Universal
4 stars 2 forks source link

[Bug] wordfence WordPress plugin severly degrades WP-CLI performance on Docker #51

Open TimidRobot opened 11 months ago

TimidRobot commented 11 months ago

Description

The wordfence WordPress plugin severely degrades WP-CLI performance on Docker. Enabling it results in WP-CLI commands taking approximately 10-20 times longer.

This does not happen on staging or production. It may be due to the fact that the current docker configuration has WordPress and WP-CLI in different containers.

Reproduction

  1. Activate wordfence plugin
    ./wpcli.sh plugin activate wordfence
  2. List plugins
    time ./wpcli.sh plugin list
    real    0m10.783s
    user    0m0.078s
    sys 0m0.037s
  3. Deactivate wordfence plugin
    ./wpcli.sh plugin deactivate wordfence
  4. List plugins
    time ./wpcli.sh plugin list
    real    0m0.385s
    user    0m0.077s
    sys 0m0.038s

    Expectation

    Local development should be performant.

Investigate to determine if the wordfence WordPress plugin can be configured so that it does not negatively impact WP-CLI performance within a docker container. Alternately, investigate moving the Docker configuration to a single container model for WordPress and WP-CLI.

Additional context

Resolution

TimidRobot commented 10 months ago

The following PR mitigates this issue: