Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Wordpress Core Installer Laravel Package

metabolism/wordpress-core-installer

Composer installer extension that adds type:wordpress-core support for installer-paths, enabling johnpbloch/wordpress-core to be installed into your chosen directory (e.g., web/edition/) instead of the default location.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture Fit

  • Limited Laravel Native Fit: This package is designed for WordPress core installation via Composer, not Laravel-specific workflows. It integrates with johnpbloch/wordpress-core to automate WordPress core downloads into custom paths, leveraging Composer’s installer-paths.
  • Use Case Alignment: Fits scenarios where Laravel coexists with WordPress (e.g., headless CMS, multisite setups, or legacy integrations). Not ideal for pure Laravel projects unless WordPress is a dependency.
  • Modularity: Can be treated as a one-off installer rather than a core dependency, reducing coupling.

Integration Feasibility

  • Composer Dependency: Requires composer/installers (≥2.0) and johnpbloch/wordpress-core. No PHP/Laravel version constraints are documented, but compatibility should be validated.
  • Path Configuration: Relies on extra.installer-paths in composer.json, which is non-standard in Laravel. May conflict with Laravel’s default Composer setup (e.g., vendor/ exclusions).
  • Post-Install Hooks: No built-in Laravel service provider or event listeners. Manual setup (e.g., symlinks, environment config) may be needed for WordPress-Laravel interop.

Technical Risk

  • Dependency Bloat: Adds johnpbloch/wordpress-core (~10MB) and composer/installers (~500KB), increasing deployment size.
  • Path Collisions: Risk of overwriting Laravel files if installer-paths target overlaps with Laravel’s public/ or storage/ directories.
  • Maintenance Overhead: WordPress core updates require composer update, which may conflict with Laravel’s autoloader or cached configurations.
  • Security: WordPress core updates introduce Laravel’s attack surface (e.g., .env exposure, plugin vulnerabilities).

Key Questions

  1. Why WordPress? Is this for a headless CMS, legacy migration, or multisite? Clarify the architectural need.
  2. Path Safety: How will WordPress files (e.g., wp-config.php) coexist with Laravel’s public/ or storage/?
  3. Update Strategy: Will WordPress core updates trigger Laravel cache rebuilds (e.g., config:clear, route:clear)?
  4. CI/CD Impact: How will this integrate with Laravel’s deployment pipelines (e.g., Forge, Envoyer)?
  5. Alternatives: Could wp-cli or Laravel’s Artisan handle WordPress installs more cleanly?

Integration Approach

Stack Fit

  • Composer-Centric: Designed for Composer-driven workflows, not Laravel’s native tooling (e.g., laravel/installer).
  • WordPress Dependency: Requires johnpbloch/wordpress-core, which may introduce version conflicts with Laravel’s PHP requirements.
  • Path-Based: Relies on filesystem paths, which may clash with Laravel’s public storage or service provider autoloading.

Migration Path

  1. Add Dependencies:
    composer require metabolism/wordpress-core-installer johnpbloch/wordpress-core composer/installers:^2.0
    
  2. Configure composer.json:
    "extra": {
        "installer-paths": {
            "public/wordpress/": ["type:wordpress-core"]
        }
    }
    
  3. Post-Install Setup:
    • Manually configure wp-config.php for Laravel’s .env (e.g., DB credentials).
    • Set up symlinks or Nginx/Apache rules to route /wp-admin to Laravel’s frontend if needed.
  4. Laravel Integration (if needed):
    • Use Laravel’s filesystem to manage WordPress uploads (e.g., storage/app/public/wordpress_uploads).
    • Create a custom Artisan command to sync WordPress tables with Laravel’s database.

Compatibility

  • PHP Version: No explicit constraints, but johnpbloch/wordpress-core targets PHP ≥7.2. Test with Laravel’s supported PHP (8.0+).
  • Laravel Version: No Laravel-specific code; risk of path conflicts with Laravel’s bootstrap/cache/ or vendor/.
  • WordPress Version: johnpbloch/wordpress-core defaults to the latest stable WordPress. May need pinning for compatibility.

Sequencing

  1. Pre-Install:
    • Validate target path (e.g., public/wordpress/) doesn’t conflict with Laravel’s structure.
    • Backup existing files if migrating.
  2. Install:
    • Run composer install or composer update to trigger WordPress install.
  3. Post-Install:
    • Configure wp-config.php for Laravel’s environment.
    • Test WordPress admin and Laravel routes for conflicts (e.g., /wp-admin vs. Laravel’s /admin).
  4. CI/CD:
    • Add composer install to deployment scripts, but exclude WordPress updates in production unless intentional.

Operational Impact

Maintenance

  • Dependency Updates:
    • WordPress core updates via composer update may break Laravel plugins or themes relying on specific PHP versions.
    • Requires manual testing of WordPress-Laravel interop after updates.
  • Configuration Drift:
    • wp-config.php changes (e.g., salts, DB settings) must sync with Laravel’s .env.
    • Risk of orphaned configurations if WordPress is updated without Laravel’s knowledge.

Support

  • Debugging Complexity:
    • Issues may span Composer, WordPress, and Laravel, requiring cross-stack troubleshooting.
    • Example: A failed WordPress update could corrupt Laravel’s bootstrap/cache/.
  • Community Resources:
    • Limited adoption (3 stars, 0 dependents) means fewer Stack Overflow answers or GitHub issues to reference.
    • Primary support relies on johnpbloch/wordpress-core and composer/installers docs.

Scaling

  • Performance:
    • WordPress core files (e.g., wp-includes/) may bloat Laravel’s deployment size (~30MB+).
    • Caching: WordPress’s object cache (e.g., Redis) must integrate with Laravel’s cache (e.g., config/cache.php).
  • Horizontal Scaling:
    • Shared storage (e.g., S3 for WordPress uploads) can mitigate filesystem bloat but adds complexity.
    • Load balancing: Ensure WordPress’s .htaccess or Nginx rules don’t conflict with Laravel’s routing.

Failure Modes

Failure Point Impact Mitigation
Composer install failure Broken WordPress install; Laravel unaffected. Rollback via composer revert.
Path collision Laravel files overwritten by WordPress (e.g., public/index.php). Use non-overlapping paths (e.g., public/wp/).
WordPress update corruption PHP version mismatch breaks Laravel plugins. Pin WordPress version in composer.json.
Database conflicts WordPress and Laravel share the same DB (e.g., wp_options vs. Laravel’s migrations). Use separate databases or prefix WordPress tables.
Cache invalidation WordPress update triggers Laravel cache corruption. Add post-update Artisan commands to clear Laravel cache.

Ramp-Up

  • Onboarding Time:
    • Developers: 2–4 hours to configure paths, wp-config.php, and test interop.
    • DevOps: Additional time to integrate into CI/CD (e.g., handling WordPress updates in production).
  • Documentation Gaps:
    • No Laravel-specific guides. Assume responsibility for documenting:
      • Path conventions (e.g., public/wordpress/).
      • .envwp-config.php sync process.
      • Update procedures.
  • Training Needs:
    • Team must understand Composer’s installer-paths, WordPress’s wp-config.php, and Laravel’s filesystem conventions.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
emuniq/filament-browser-notifications
syriable/filament-translator
hungnm28/livewire-form
wenprise/eloquent
crudly/encrypted
fadion/bouncy
cuci/prototurk-sdk
gos/pubsub-router-bundle
cuci/prototurk-sdk-symfony
clementtalleu/easyadmin-markdown-bundle
codeflextech/permission-manager
karnoweb/livewire-datepicker
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui