Skip to content

Comments

Plugin Directory: Add wp-env local development environment#555

Draft
dd32 wants to merge 2 commits intoWordPress:trunkfrom
dd32:create/claude/plugin-directory-wp-env
Draft

Plugin Directory: Add wp-env local development environment#555
dd32 wants to merge 2 commits intoWordPress:trunkfrom
dd32:create/claude/plugin-directory-wp-env

Conversation

@dd32
Copy link
Member

@dd32 dd32 commented Feb 23, 2026

Summary

  • Adds a wp-env configuration for running the plugin directory locally with Docker
  • Includes mock mu-plugins for production-only services (WPORG_Ratings, HelpScout/Trac/SVN/translate DB queries)
  • Auto-imports plugin data from the WordPress.org REST API on first load (featured, popular, beta sections with users, icons, banners, tags)
  • Fixes several compatibility issues in plugin-directory and theme code for non-production environments

Environment setup

cd environments && npm install
cd plugin-directory && npx wp-env start

On first page load, ~20 plugins are imported automatically from wordpress.org.

Code fixes

  • Gate Jetpack Search class instantiation behind class_exists checks
  • Only rewrite asset URLs to CDN when wp_get_environment_type() is production
  • Fix get_site() fatal on non-multisite in locale banner route
  • Fix PHP 8.2 dynamic property deprecation on WP_List_Table subclass
  • Fix false-to-array deprecation in get_plugin_banner() fallback
  • Fix undefined HTTP_HOST/REQUEST_URI warnings in CLI context

Test plan

  • Run npx wp-env start from environments/plugin-directory/
  • Verify first page load auto-imports plugins with icons, banners, and contributors
  • Verify plugin single pages render without errors
  • Verify no CDN URLs are loaded locally
  • Verify no DB errors for missing production tables

🤖 Generated with Claude Code

@dd32 dd32 force-pushed the create/claude/plugin-directory-wp-env branch from 341fdfd to 1b81fe3 Compare February 23, 2026 08:23
dd32 and others added 2 commits February 23, 2026 18:28
Adds a wp-env configuration for running the plugin directory locally,
with mocks for production-only services and a lifecycle script that
seeds plugin data from the WordPress.org API after first start.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ments.

- Gate Jetpack Search class instantiation behind class_exists checks
- Only rewrite asset URLs to CDN when wp_get_environment_type() is production
- Fix get_site() fatal on non-multisite in locale banner route
- Fix PHP 8.2 dynamic property deprecation on WP_List_Table subclass
- Fix false-to-array deprecation in get_plugin_banner() fallback
- Fix undefined HTTP_HOST/REQUEST_URI warnings in CLI context

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dd32 dd32 force-pushed the create/claude/plugin-directory-wp-env branch from 1b81fe3 to efc2a91 Compare February 23, 2026 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant