upskill-event-manager/fix-registration-pending-content.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

50 lines
No EOL
1.4 KiB
Bash
Executable file

#!/bin/bash
# Fix registration pending page content
# This script updates the page content to use the template system
echo "🔧 Fixing registration pending page content..."
# SSH to production server
ssh upskill@207.154.230.172 << 'EOF'
cd /var/www/html
# Get the page ID
PAGE_ID=$(wp post list --post_type=page --name=registration-pending --field=ID --allow-root)
if [ -z "$PAGE_ID" ]; then
echo "❌ Registration pending page not found"
exit 1
fi
echo "📄 Found page ID: $PAGE_ID"
# Delete the existing page so it can be recreated with proper content
wp post delete $PAGE_ID --force --allow-root
echo "🗑️ Deleted existing page"
# Trigger page recreation by calling the plugin activation hook
wp eval 'HVAC_Page_Manager::create_pages();' --allow-root
echo "🔄 Recreated pages with updated content"
# Clear all caches
wp cache flush --allow-root
wp eval 'if (function_exists("wp_cache_flush")) wp_cache_flush();' --allow-root
# Clear Breeze cache if available
if wp plugin is-active breeze --allow-root; then
wp eval 'if (class_exists("Breeze_Admin")) { Breeze_Admin::breeze_clear_all_cache(); }' --allow-root
echo "🧹 Cleared Breeze cache"
fi
# Clear any OPcache
if command -v php >/dev/null 2>&1; then
php -r "if (function_exists('opcache_reset')) { opcache_reset(); echo 'Cleared OPcache\n'; }"
fi
echo "✅ Registration pending page content updated successfully"
EOF
echo "🎉 Registration pending page fix completed!"