upskill-event-manager/verify-page-creation.sh
bengizmo 993a820a84 feat: Add comprehensive development artifacts to repository
- Add 26 documentation files including test reports, deployment guides, and troubleshooting documentation
- Include 3 CSV data files for trainer imports and user registration tracking
- Add 43 JavaScript test files covering mobile optimization, Safari compatibility, and E2E testing
- Include 18 PHP utility files for debugging, geocoding, and data analysis
- Add 12 shell scripts for deployment verification, user management, and database operations
- Update .gitignore with whitelist patterns for development files, documentation, and CSV data

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-11 12:26:11 -03:00

61 lines
No EOL
2.3 KiB
Bash
Executable file

#!/bin/bash
echo "=== Verifying Page Creation After Deployment ==="
echo "Date: $(date)"
echo
# SSH connection details
SERVER="146.190.76.204"
USER="roodev"
echo "🔍 Checking if registration-pending page exists..."
# Execute verification via SSH
ssh ${USER}@${SERVER} << 'EOF'
cd /home/974670.cloudwaysapps.com/uberrxmprk/public_html
echo "=== Page Creation Verification ==="
echo "🔍 Step 1: Check if registration-pending page exists in database..."
wp post list --post_type=page --name=registration-pending --fields=ID,post_title,post_name,post_status
echo
echo "🔍 Step 2: List all pages with 'registration' or 'pending' in the name..."
wp post list --post_type=page --search="registration" --fields=ID,post_title,post_name,post_status
echo
echo "🔍 Step 3: Check if training-login page exists..."
wp post list --post_type=page --name=training-login --fields=ID,post_title,post_name,post_status
echo
echo "🔍 Step 4: Create registration-pending page manually if missing..."
EXISTING_PAGE=$(wp post list --post_type=page --name=registration-pending --format=count)
if [ "$EXISTING_PAGE" -eq 0 ]; then
echo "Page doesn't exist, creating it..."
wp post create --post_type=page --post_title="Registration Pending" --post_name="registration-pending" --post_status=publish --post_content='<div class="hvac-registration-pending">
<h2>Registration Submitted Successfully</h2>
<p>Thank you for registering as an HVAC trainer. Your registration has been submitted and is currently being reviewed.</p>
<p>You will receive an email notification once your account has been approved and activated.</p>
<p>If you have any questions, please contact our support team.</p>
<p><a href="/training-login/" class="button">Return to Login</a></p>
</div>'
echo "✅ Registration pending page created successfully"
else
echo "✅ Page already exists"
fi
echo
echo "🔍 Step 5: Test URL accessibility..."
wp eval "
echo 'Testing URL: ' . home_url('/registration-pending/') . PHP_EOL;
\$response = wp_remote_get(home_url('/registration-pending/'));
if (is_wp_error(\$response)) {
echo 'Error: ' . \$response->get_error_message() . PHP_EOL;
} else {
echo 'HTTP Status: ' . wp_remote_retrieve_response_code(\$response) . PHP_EOL;
}
"
EOF
echo "✅ Page creation verification completed!"