File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,9 @@ public function __construct( Container $container ) {
6464 $ this ->hooks ();
6565
6666 new Cache ( $ container );
67- new Skip404 ( $ container );
67+ if ( Skip404::is_active ( $ container ) ) {
68+ new Skip404 ( $ container );
69+ }
6870 new PerformanceWPCLI ();
6971 new Constants ( $ container );
7072 new CloudflareFeaturesManager ( $ container );
@@ -112,6 +114,11 @@ public function configureContainer( Container $container ) {
112114 global $ is_apache ;
113115 }
114116
117+ // Skip .htaccess modifications in local environments (e.g. wp-env, Docker) to avoid 500s from patch/regex issues.
118+ if ( function_exists ( 'wp_get_environment_type ' ) && 'local ' === wp_get_environment_type () ) {
119+ $ is_apache = false ;
120+ }
121+
115122 $ container ->set ( 'isApache ' , $ is_apache );
116123
117124 $ container ->set (
You can’t perform that action at this time.
0 commit comments