Skip to Content

Deployment

🎯 Goal: Fully test the migrated site and fix any broken links or configs. Finalize your local Bedrock setup by pushing changes to staging and resolving any PHP errors or compatibility issues.

  1. Fix PHP Errors, Warnings & Deprecated Code

    After the migration, you may encounter issues due to updated PHP versions or Bedrock’s stricter environment. Here’s how to catch and fix them:

    ✅ Enable Debugging

    In your .env file, enable debugging:

    WP_DEBUG=true WP_DEBUG_LOG=true WP_DEBUG_DISPLAY=false

    ✅ Review Logs

    • Check for issues in:
    web/wp/wp-content/debug.log
    • Common problems:

    • Deprecated functions (e.g., get_bloginfo('url')home_url())

    • Old PHP constructor usage (replace with __construct())

    • Undefined indexes, variables, or constants

Step 2. Push to Staging (Files + Database)

Once everything is running locally, push your site to the staging environment.

Push Code via Git

  1. Stage and commit your changes:

    terminal
    git add . git commit -m "Finalize Bedrock migration – push to staging"
  2. Push to GitLab (or your Git remote):

    terminal
    git push origin main

✅ This will trigger CI/CD or deployment script that updates your staging environment.

Push Database Using WP Migrate

  1. Go to Tools → WP Migrate on your local Bedrock site.
  2. Select the Push option.
  3. Choose the staging site as the destination.
  4. Make sure:
    • WP Migrate is active on staging.
    • Push is enabled in its settings.
  5. Configure replacements:
    • Local URLs and paths → staging domain and path
  6. Start the push and wait until the migration is complete.

✅ Final Staging Checklist

  • Media loads correctly from /web/app/uploads or R2 (if configured)
  • Permalinks are working
  • Plugins and themes function properly
  • No PHP errors in the frontend or admin
Last updated on