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

johnpbloch/wordpress-core-installer

Composer plugin that installs WordPress core outside vendor, designed for setups with WordPress in a subdirectory and wp-content moved elsewhere to avoid updates wiping content. Supports custom install paths via wordpress-install-dir.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. Buy: Eliminates the need to build a custom WordPress deployment solution from scratch, saving 3–6 months of dev time per project. Ideal for teams already using Composer for PHP dependencies.
  • Feature Roadmap:
    • Composer-Driven WordPress: Enable WordPress core to be treated as a first-class Composer dependency, aligning with Laravel’s dependency management.
    • Multi-Environment Parity: Standardize WordPress installations across dev/staging/prod with version-pinned core (e.g., wordpress-core-installer:^5.0).
    • Isolated wp-content: Prevent accidental deletions during updates, critical for agency workflows where plugins/themes are client-specific.
    • Hybrid Laravel-WordPress Apps: Support headless WordPress setups where WordPress powers content via REST API, while Laravel handles frontend/logic.
  • Use Cases:
    • Agencies: Deploy client sites with reproducible, version-controlled WordPress cores.
    • Enterprise: Manage WordPress as a microservice in a Laravel ecosystem (e.g., REST API backend).
    • Custom Distributions: Bundle WordPress core in a monorepo with Laravel, plugins, and themes (e.g., composer.json with type: wordpress-core).
    • CI/CD Automation: Integrate with GitHub Actions/GitLab CI for zero-touch WordPress updates.

When to Consider This Package

  • Adopt if:

    • You need WordPress core installed outside vendor/ (e.g., /var/www/wordpress) with wp-content in a separate directory (e.g., /var/www/wp-content).
    • Your team uses Composer for PHP dependencies and wants to extend it to WordPress.
    • You require reproducible WordPress deployments (e.g., for staging/production parity).
    • You’re moving wp-content outside the core directory to avoid update-related data loss (see WordPress Codex).
    • You’re building a Laravel + WordPress hybrid app where WordPress is a submodule (e.g., REST API backend).
  • Look elsewhere if:

    • You use default WordPress installations (no custom directory structure).
    • Your team doesn’t use Composer (relies on manual downloads or WP-CLI).
    • You need active maintenance (last release: 2020; consider forks like wp-php or alternatives like bedrock).
    • You require plugin/theme integration (this package is core-only; use wp-cli or wp-env for full-stack management).
    • You’re constrained by GPL-2.0 licensing (ensure compatibility with your project’s license).
    • You’re using Laravel as a standalone app without WordPress integration (this package adds unnecessary complexity).

How to Pitch It (Stakeholders)

For Executives/Business Leaders:

*"This package lets us treat WordPress like a Composer dependency—just like our Laravel packages—so our team can deploy WordPress sites consistently and automatically. No more manual downloads or broken updates wiping out plugins. It’s especially valuable for [agency projects/headless WordPress APIs], where we need to isolate core updates from custom content.

Key Benefits:

  • Faster deployments: Spin up WordPress in seconds with composer install (saves 10–20 hours/year per developer).
  • Reduced risk: Core updates won’t accidentally delete plugins/themes (critical for client sites).
  • Scalable: Standardize WordPress across all environments (dev/staging/prod).
  • Future-proof: Aligns with modern PHP ecosystems (Composer, Laravel, etc.).

Example: If we’re building a Laravel + WordPress hybrid app, this package ensures WordPress core updates are controlled and reproducible, while Laravel handles the frontend. Think of it as ‘npm for WordPress’—version-controlled, reproducible, and scalable."*


For Engineering/DevOps:

*"This solves two critical pain points:

  1. Composer + WordPress: Install WordPress core as a dependency (e.g., johnpbloch/wordpress-core-installer:^5.0) alongside Laravel packages.
  2. Safe updates: By default, Composer deletes wp-content on updates. This package lets us move wp-content outside the core directory, so updates are clean and non-destructive.

How to Use It:

  1. Add to composer.json:
    "require": {
        "johnpbloch/wordpress-core-installer": "^1.0"
    },
    "extra": {
        "installer-paths": {
            "wp/": ["type:wordpress-core-installer"]
        }
    }
    
  2. Configure wp-config.php to point WP_CONTENT_DIR to a custom location (e.g., /var/www/wp-content).
  3. Run composer install—WordPress core installs outside vendor/, and wp-content stays intact.

Alternatives Considered:

  • Bedrock: More opinionated (Roots framework), but heavier for simple use cases.
  • WP-CLI: Manual process; doesn’t integrate with Composer.
  • Custom scripts: Reinventing the wheel; this package is battle-tested (200+ stars).

Risks:

  • Stale maintenance: Last release in 2020. Mitigate by:
    • Forking and updating for critical needs (e.g., Composer v2 support).
    • Pairing with wp-cli db export/import for full-stack backups.
  • GPL-2.0: Ensure compliance if using in proprietary projects.

Recommendation: Pilot this for one WordPress + Laravel hybrid project to validate the workflow before wider adoption. If successful, we can standardize it across all WordPress deployments."*


For Developers:

*"If you’re tired of manually downloading WordPress or dealing with broken updates that wipe out wp-content, this package is a game-changer. It lets you manage WordPress core via Composer, just like any other PHP library.

Why It’s Useful:

  • No more wp-content deletions: The package moves wp-content outside the core directory, so updates are safe.
  • Version pinning: Lock WordPress to a specific version (e.g., 5.8) just like Laravel packages.
  • Works with Laravel: If you’re building a Laravel + WordPress hybrid app, this ensures WordPress core updates don’t break your setup.

Setup:

  1. Add to composer.json:
    "require": {
        "johnpbloch/wordpress-core-installer": "^1.0"
    },
    "extra": {
        "wordpress-install-dir": "wp"
    }
    
  2. Configure wp-config.php to point WP_CONTENT_DIR to a custom folder (e.g., storage/app/wp-content).
  3. Run composer install—done!

Pro Tip: Pair this with Laravel’s Artisan commands to automate WordPress migrations or plugin activations.

Caveats:

  • Last updated in 2020—test thoroughly with your stack.
  • Not for vanilla WordPress; designed for custom directory setups.
  • If you need plugin/theme management, use wp-cli alongside this.

Try it on a side project first!"*

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.
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle