Quick Start - Fixing the install.php Redirect
Problem
WordPress apps on DO App Platform redirect to install.php because database URLs don't match app URLs.
Solution
Deploy the pre-configured wp-config.php files to fix URL mismatch.
Step-by-Step Deployment
1. Generate Security Keys (Required Before Deployment)
Each WordPress site needs unique security keys. Run this script to add them:
cd /home/cw/Documents/IBG_HUB/rmm-psa-devops/wordpress-templates
./add-security-keys.sh
Or manually for each file:
- Visit: https://api.wordpress.org/secret-key/1.1/salt/
- Copy the generated keys
- Replace the placeholder keys in each wp-config file
2. Deploy to DigitalOcean App Platform
Option A: Via DO Console (Recommended for Testing)
- Go to DigitalOcean App Platform
- Select your app (e.g., wordpress-performwritecom-7alzt)
- Go to Console tab
- Upload the wp-config file or edit directly:
- Paste the contents from the generated config file
- Save and exit (Ctrl+X, Y, Enter)
- App will automatically restart
Option B: Via GitHub/GitLab (For Automated Deployment)
- Add wp-config.php to your WordPress repository
- DO NOT commit to public repos - database password is in the file
- Use private repository or environment variables instead
- Push to trigger automatic deployment
Option C: Via doctl CLI
# Install doctl if not already installed
snap install doctl
# Authenticate
doctl auth init
# List apps
doctl apps list
# Get app ID for performwritecom
APP_ID="your-app-id-here"
# Deploy using app spec (create app spec with wp-config as build command)
doctl apps update $APP_ID --spec app-spec.yaml
3. Verify Deployment
After deploying wp-config.php:
- Visit your app URL: https://wordpress-performwritecom-7alzt.ondigitalocean.app
- Should see WordPress site (not install.php redirect)
- Test wp-admin: https://wordpress-performwritecom-7alzt.ondigitalocean.app/wp-admin
- Login with existing WordPress credentials
Generated Config Files
All wp-config.php files are located in:
/home/cw/Documents/IBG_HUB/rmm-psa-devops/wordpress-templates/configs/
File List (16 sites):
| Config File | Database | Domain | Status |
| wp-config-collegeo_wp.php | collegeo_wp | comsmta.org | ⚠️ Needs security keys |
| wp-config-coomerawatersrea_wp.php | coomerawatersrea_wp | coomerawatersrealestate.com.au | ⚠️ Needs security keys |
| wp-config-corne582_wp.php | corne582_wp | cornerstone-constructions.com.au | ⚠️ Needs security keys |
| wp-config-handsofd_wp.php | handsofd_wp | www.handsofdestiny.com.au | ⚠️ Needs security keys |
| wp-config-kandudeliveriesc_wp.php | kandudeliveriesc_wp | kandudeliveries.com.au | ⚠️ Needs security keys |
| wp-config-laserxperts_wp.php | laserxperts_wp | laser-x-perts.com.au | ⚠️ Needs security keys |
| wp-config-murbahmowers_wp.php | murbahmowers_wp | murwillumbahmowers.com.au | ⚠️ Needs security keys |
| wp-config-murwillu_wp.php | murwillu_wp | murwillumbahchamber.com.au | ⚠️ Needs security keys |
| wp-config-outdoor1_wp.php | outdoor1_wp | outdoorism.com.au | ⚠️ Needs security keys |
| wp-config-path2ucom_wp.php | path2ucom_wp | path2u.com.au | ⚠️ Needs security keys |
| wp-config-performwritecom_wp.php | performwritecom_wp | www.performwrite.com.au | ⚠️ Needs security keys |
| wp-config-pits_wp.php | pits_wp | preciseitservices.com.au | ⚠️ Needs security keys |
| wp-config-redheale_wp.php | redheale_wp | redhealer.com.au | ⚠️ Needs security keys |
| wp-config-sfnm_wp.php | sfnm_wp | supportfornewmums.info | ⚠️ Needs security keys |
| wp-config-soilife_wp.php | soilife_wp | soilifefarming.com.au | ⚠️ Needs security keys |
| wp-config-vastcons_wp.php | vastcons_wp | www.vastconstructions.com.au | ⚠️ Needs security keys |
What Each Config File Does
- Database Connection: Connects to DigitalOcean MySQL cluster with SSL
- Environment Detection: Automatically detects if running on:
- DO App Platform (*.ondigitalocean.app) → uses app URL
- Production domain → uses original domain
- Table Prefix: Auto-detected from database (e.g., xfwlw_, wp_, etc.)
- Debug Mode: Enabled on staging, disabled on production
- Security: Forces SSL, disables file editing, enables auto-updates
Testing Checklist
After deploying each wp-config.php:
- Site loads without install.php redirect
- Frontend pages display correctly
- Images/media display correctly
- Plugins function properly
Troubleshooting
Still Redirects to install.php
Check:
- wp-config.php uploaded correctly
- File permissions are correct (644)
- Environment detection logic is working
- Database connection is successful
Debug:
var_dump($_SERVER['HTTP_HOST']);
var_dump(WP_HOME);
var_dump(WP_SITEURL);
die();
Database Connection Errors
Check:
- Database credentials are correct
- SSL is enabled (MYSQLI_CLIENT_SSL)
- MySQL cluster is accessible from App Platform
- Database name matches exactly
Test connection:
$link = mysqli_connect(
DB_HOST,
DB_USER,
DB_PASSWORD,
DB_NAME,
null,
null,
MYSQL_CLIENT_FLAGS
);
if (!$link) {
die('Database connection failed: ' . mysqli_connect_error());
}
echo 'Database connected successfully!';
mysqli_close($link);
die();
White Screen / 500 Error
Check:
- PHP syntax errors in wp-config.php
- File permissions
- App Platform logs for error details
View logs:
doctl apps logs $APP_ID --type=run
Next Steps After Deployment
- ✅ Deploy wp-config to all 16 apps
- ✅ Test each app
- 🔄 Set up DigitalOcean Spaces CDN
- 🔄 Migrate static assets to CDN
- 🔄 Update DNS to point to App Platform
- 🔄 Add sites to RMM dashboard
Security Notes
⚠️ IMPORTANT:
- DO NOT commit wp-config.php files to public repositories (database password is in plain text)
- DO use environment variables for sensitive data in production
- DO generate unique security keys for each site
- DO keep .gitignore updated to exclude wp-config.php
- DO rotate database passwords periodically
Support Resources
Last Updated: February 17, 2026