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.
-
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
-
Stage and commit your changes:
terminalgit add . git commit -m "Finalize Bedrock migration – push to staging"
-
Push to GitLab (or your Git remote):
terminalgit push origin main
✅ This will trigger CI/CD or deployment script that updates your staging environment.
Push Database Using WP Migrate
- Go to Tools → WP Migrate on your local Bedrock site.
- Select the Push option.
- Choose the staging site as the destination.
- Make sure:
- WP Migrate is active on staging.
- Push is enabled in its settings.
- Configure replacements:
- Local URLs and paths → staging domain and path
- 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