[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77YHP0BNZ38B99Y1F0RAAXT":3,"skill-same:01M77YHP0BNZ38B99Y1F0RAAXT":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M77YHP0BNZ38B99Y1F0RAAXT","wordpress-trade-site",null,"Interactive guide to deploy a production-ready WordPress site for international trade businesses. Triggers on \"build a trade website\", \"deploy wordpress trade site\", \"set up B2B website\", or similar requests.","Lord1Egypt\u002Fawesome-skill-forge","Lord1Egypt","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99746359?v=4","01M7592YDNT0XK9WJ0T2MQVPDN","Mohamed Mounir Ali AL Keshita","01M75GRFNHC8VZNWEB8DKDE433",3,"MIT","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fclawhub\u002Fw\u002Fwordpress-trade-site\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: wordpress-trade-site\ndescription: Interactive guide to deploy a production-ready WordPress site for international trade businesses. Triggers on \"build a trade website\", \"deploy wordpress trade site\", \"set up B2B website\", or similar requests.\n---\n\n# WordPress Trade Site Builder\n\nDeploy a production-ready WordPress trade site from scratch through 9 interactive phases. Based on the [wordpress-trade-starter](https:\u002F\u002Fgithub.com\u002FiPythoning\u002Fwordpress-trade-starter) template.\n\n**Principle:** Automate everything possible. Only pause when user decisions or information are required. When errors occur, diagnose and fix them proactively — don't tell the user to go fix things themselves.\n\n**Interaction:** Use `AskUserQuestion` for all user-facing questions. Report progress after each phase, then continue to the next.\n\n**Data flow:** Information collected in each phase (business info, SSH details, domain, etc.) is reused in subsequent phases. Key data is labeled with variable names for reference.\n\n---\n\n## Phase 1: Collect Business Information\n\nBefore any technical work, understand the user's business needs.\n\nAskUserQuestion (collect sequentially):\n\n1. **Company name** — \"What is your company name? (Both local language and English)\"\n   - Example: TitanPuls Technology Co., Ltd.\n   - Record as `COMPANY_EN` (and `COMPANY_LOCAL` if provided)\n\n2. **Main products** — \"What products do you mainly sell? (Brief description)\"\n   - Example: Semi-trailers, construction machinery\n   - Record as `PRODUCTS`\n\n3. **Target markets** — \"Which markets do you primarily target?\" (multiSelect)\n   - Africa\n   - Middle East\n   - Southeast Asia\n   - Latin America\n   - Europe\n   - North America\n   - Record as `TARGET_MARKETS`\n\n4. **Languages** — \"Which languages should your website support?\" (multiSelect, recommend based on target markets)\n   - English (Recommended)\n   - Chinese\n   - Russian\n   - Spanish\n   - French\n   - Arabic\n   - Record as `LANGUAGES`\n\n5. **Contact info** — \"How should customers reach you?\"\n   - WhatsApp number (with country code)\n   - Business email\n   - Record as `WHATSAPP` and `EMAIL`\n\nSummary confirmation: Display collected information and AskUserQuestion to confirm correctness.\n\n---\n\n## Phase 2: Server Preparation\n\n### 2a. Server status\n\nAskUserQuestion: \"Do you already have a Linux server?\"\n- **I have a server** — Collect SSH details\n- **I need guidance** — Recommend datacenter locations and providers based on `TARGET_MARKETS`\n\n**Purchase guidance** (if needed):\n\nRecommend based on target market:\n| Target Market | Recommended DC | Recommended Providers |\n|--------------|----------------|----------------------|\n| Europe\u002FAfrica | Germany\u002FNetherlands | Contabo, Hetzner |\n| North America | US East\u002FWest Coast | DigitalOcean, Vultr |\n| Southeast Asia | Singapore | Vultr, Alibaba Cloud |\n| Middle East | Dubai\u002FBahrain | AWS, Alibaba Cloud |\n| Latin America | US Miami | DigitalOcean |\n\nRecommended specs: 2 cores \u002F 2GB RAM \u002F 40GB SSD ($10-20\u002Fmonth). Tell user to continue after purchase.\n\n### 2b. SSH connection\n\nAskUserQuestion: \"Please provide your server SSH details:\"\n- IP address → `SERVER_IP`\n- SSH port (default 22) → `SSH_PORT`\n- Username (usually root) → `SSH_USER`\n- Authentication: password or SSH key\n\nVerify connection:\n\n```bash\nssh -o ConnectTimeout=10 -o StrictHostKeyChecking=no -p ${SSH_PORT} ${SSH_USER}@${SERVER_IP} \"echo CONNECTION_OK && uname -a && free -m && df -h \u002F\"\n```\n\n- CONNECTION_OK → Continue\n- Connection failed → Check IP\u002Fport\u002Fcredentials, prompt user to correct\n\n### 2c. Server initialization\n\nExecute via SSH:\n\n```bash\n# System update\napt update && apt upgrade -y\n\n# Set timezone\ntimedatectl set-timezone UTC\n\n# Create swap (if RAM \u003C= 2GB and no swap exists)\nif [ $(free -m | awk '\u002F^Mem:\u002F{print $2}') -le 2048 ] && [ ! -f \u002Fswapfile ]; then\n    fallocate -l 2G \u002Fswapfile\n    chmod 600 \u002Fswapfile\n    mkswap \u002Fswapfile\n    swapon \u002Fswapfile\n    echo '\u002Fswapfile none swap sw 0 0' >> \u002Fetc\u002Ffstab\nfi\n\n# Firewall\nufw allow 22\u002Ftcp\nufw allow 80\u002Ftcp\nufw allow 443\u002Ftcp\nufw --force enable\n\n# Essential tools\napt install -y curl git unzip htop\n```\n\nVerify: `ufw status` shows 22\u002F80\u002F443 open.\n\n---\n\n## Phase 3: Docker Deployment\n\n### 3a. Install Docker\n\n```bash\nif ! command -v docker &>\u002Fdev\u002Fnull; then\n    curl -fsSL https:\u002F\u002Fget.docker.com | sh\n    systemctl enable docker && systemctl start docker\nfi\ndocker compose version || apt-get install -y docker-compose-plugin\n```\n\nVerify: `docker compose version` outputs a version number.\n\n### 3b. Clone template\n\n```bash\ncd \u002Fopt\ngit clone https:\u002F\u002Fgithub.com\u002FiPythoning\u002Fwordpress-trade-starter.git wordpress\ncd \u002Fopt\u002Fwordpress\n```\n\n### 3c. Generate .env\n\nAskUserQuestion: \"Please provide the following:\"\n- Domain name (e.g. example.com) → `DOMAIN`\n- MySQL root password (auto-generate recommended) → `MYSQL_ROOT_PASSWORD`\n- MySQL user password (auto-generate recommended) → `MYSQL_PASSWORD`\n\nIf user chooses auto-generation:\n```bash\nMYSQL_ROOT_PASSWORD=$(openssl rand -base64 16)\nMYSQL_PASSWORD=$(openssl rand -base64 16)\n```\n\nWrite .env:\n```bash\ncat > \u002Fopt\u002Fwordpress\u002F.env \u003C\u003C EOF\nMYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}\nMYSQL_DATABASE=wordpress\nMYSQL_USER=wordpress\nMYSQL_PASSWORD=${MYSQL_PASSWORD}\nDOMAIN=${DOMAIN}\nEMAIL=${EMAIL}\nEOF\n```\n\n**Important:** Display the generated passwords to the user and remind them to save securely.\n\n### 3d. Configure Nginx\n\n```bash\nsed -i \"s\u002FYOUR_DOMAIN\u002F${DOMAIN}\u002Fg\" \u002Fopt\u002Fwordpress\u002Fnginx.conf\n```\n\n### 3e. Start containers\n\n```bash\ncd \u002Fopt\u002Fwordpress\ndocker compose up -d\n```\n\nVerify:\n```bash\ndocker compose ps\n# Confirm all three containers (db, wordpress, nginx) are running\u002Fhealthy\n```\n\nWait for WordPress to be ready:\n```bash\nfor i in $(seq 1 30); do\n    curl -sf http:\u002F\u002Flocalhost > \u002Fdev\u002Fnull 2>&1 && break\n    sleep 2\ndone\n```\n\n- All 3 containers running → Continue\n- db unhealthy → Check `docker compose logs db`, common cause is password format issues\n- wordpress not starting → Check `docker compose logs wordpress`\n\n---\n\n## Phase 4: SSL Certificate\n\n### 4a. Choose method\n\nAskUserQuestion: \"Which SSL certificate method?\"\n- **Let's Encrypt (Recommended)** — Free, auto-renewal, requires domain A record pointing to server IP\n- **Cloudflare Origin Certificate** — For users already using Cloudflare proxy\n\n### 4b-A. Let's Encrypt\n\nPrerequisite: Domain A records must point to `SERVER_IP`. If not configured, guide the user to add in their DNS panel:\n- `DOMAIN` → A → `SERVER_IP`\n- `www.DOMAIN` → A → `SERVER_IP`\n\n```bash\n# Stop nginx to free port 80\ncd \u002Fopt\u002Fwordpress && docker compose stop nginx\n\napt install -y certbot\ncertbot certonly --standalone -d ${DOMAIN} -d www.${DOMAIN} --email ${EMAIL} --agree-tos --non-interactive\n\nmkdir -p \u002Fopt\u002Fwordpress\u002Fssl\ncp \u002Fetc\u002Fletsencrypt\u002Flive\u002F${DOMAIN}\u002Ffullchain.pem \u002Fopt\u002Fwordpress\u002Fssl\u002F\ncp \u002Fetc\u002Fletsencrypt\u002Flive\u002F${DOMAIN}\u002Fprivkey.pem \u002Fopt\u002Fwordpress\u002Fssl\u002F\n\n# Auto-renewal cron\n(crontab -l 2>\u002Fdev\u002Fnull; echo \"0 3 * * * certbot renew --quiet --pre-hook 'cd \u002Fopt\u002Fwordpress && docker compose stop nginx' --post-hook 'cp \u002Fetc\u002Fletsencrypt\u002Flive\u002F${DOMAIN}\u002Ffullchain.pem \u002Fopt\u002Fwordpress\u002Fssl\u002F && cp \u002Fetc\u002Fletsencrypt\u002Flive\u002F${DOMAIN}\u002Fprivkey.pem \u002Fopt\u002Fwordpress\u002Fssl\u002F && cd \u002Fopt\u002Fwordpress && docker compose start nginx'\") | crontab -\n\n# Restart nginx\ndocker compose start nginx\n```\n\n### 4b-B. Cloudflare Origin Certificate\n\nGuide the user through Cloudflare Dashboard:\n1. SSL\u002FTLS → Origin Server → Create Certificate\n2. Choose RSA, 15-year validity\n3. Copy Certificate and Private Key\n\n```bash\nmkdir -p \u002Fopt\u002Fwordpress\u002Fssl\n# User pastes certificate content\ncat > \u002Fopt\u002Fwordpress\u002Fssl\u002Ffullchain.pem \u003C\u003C 'EOF'\n\u003Cuser pastes certificate here>\nEOF\ncat > \u002Fopt\u002Fwordpress\u002Fssl\u002Fprivkey.pem \u003C\u003C 'EOF'\n\u003Cuser pastes private key here>\nEOF\n```\n\n### 4c. Verify HTTPS\n\n```bash\ndocker compose restart nginx\ncurl -I https:\u002F\u002F${DOMAIN} 2>\u002Fdev\u002Fnull | head -5\n```\n\n- HTTP\u002F2 200 → Success\n- Connection failed → Check DNS resolution, certificate paths, nginx logs\n\n---\n\n## Phase 5: WordPress Initialization\n\n### 5a. Setup wizard\n\nTell the user to open `https:\u002F\u002F${DOMAIN}\u002Fwp-admin\u002Finstall.php` in their browser and fill in:\n- Site Title: `COMPANY_EN`\n- Username: suggest avoiding \"admin\" (security)\n- Password: strong password\n- Email: `EMAIL`\n\nAskUserQuestion: \"Have you completed the WordPress setup wizard?\"\n\n### 5b. Install WP-CLI\n\n```bash\ndocker compose exec wordpress bash -c '\ncurl -O https:\u002F\u002Fraw.githubusercontent.com\u002Fwp-cli\u002Fbuilds\u002Fgh-pages\u002Fphar\u002Fwp-cli.phar\nchmod +x wp-cli.phar\nmv wp-cli.phar \u002Fusr\u002Flocal\u002Fbin\u002Fwp\n'\n```\n\nVerify: `docker compose exec wordpress wp --info --allow-root`\n\n### 5c. Base configuration\n\n```bash\ndocker compose exec wordpress wp --allow-root option update blogname \"${COMPANY_EN}\"\ndocker compose exec wordpress wp --allow-root option update blogdescription \"${PRODUCTS} - ${COMPANY_EN}\"\ndocker compose exec wordpress wp --allow-root option update timezone_string \"UTC\"\ndocker compose exec wordpress wp --allow-root option update date_format \"Y-m-d\"\ndocker compose exec wordpress wp --allow-root option update permalink_structure \"\u002F%postname%\u002F\"\n\n# Delete default content\ndocker compose exec wordpress wp --allow-root post delete 1 2 --force\ndocker compose exec wordpress wp --allow-root widget reset --all\n```\n\n---\n\n## Phase 6: Theme & Plugin Installation\n\n### 6a. Astra theme + Child Theme\n\n```bash\ndocker compose exec wordpress wp --allow-root theme install astra --activate\n\n# Create Child Theme\ndocker compose exec wordpress bash -c '\nmkdir -p \u002Fvar\u002Fwww\u002Fhtml\u002Fwp-content\u002Fthemes\u002Fastra-child\ncat > \u002Fvar\u002Fwww\u002Fhtml\u002Fwp-content\u002Fthemes\u002Fastra-child\u002Fstyle.css \u003C\u003C \"CSS\"\n\u002F*\nTheme Name: Astra Child\nTemplate: astra\nVersion: 1.0.0\n*\u002F\nCSS\ncat > \u002Fvar\u002Fwww\u002Fhtml\u002Fwp-content\u002Fthemes\u002Fastra-child\u002Ffunctions.php \u003C\u003C \"PHP\"\n\u003C?php\nadd_action(\"wp_enqueue_scripts\", function() {\n    wp_enqueue_style(\"parent-style\", get_template_directory_uri() . \"\u002Fstyle.css\");\n});\nPHP\n'\ndocker compose exec wordpress wp --allow-root theme activate astra-child\n```\n\n### 6b. Batch install plugins\n\nInstall plugins one by one to track failures:\n\n```bash\nPLUGINS=\"elementor seo-by-rank-math wp-super-cache imagify jetpack-boost polylang contact-form-7 flamingo chaty ecommerce-product-catalog\"\nfor plugin in $PLUGINS; do\n    docker compose exec wordpress wp --allow-root plugin install $plugin --activate 2>&1 || echo \"WARN: $plugin install failed, manual install needed\"\ndone\n```\n\nNote: Some plugins may not be in the wordpress.org directory. For failed installs, inform the user to install manually from the admin panel (Plugins → Add New).\n\n### 6c. Configure CF7 + Flamingo\n\n**Critical:** CF7 only sends emails by default — if the recipient email is wrong, all inquiries are lost permanently. Flamingo stores every submission in the WP database as a safety net.\n\nAfter installing, verify:\n\n```bash\n# Verify Flamingo is active (auto-stores CF7 submissions)\ndocker compose exec wordpress wp --allow-root plugin list --status=active --field=name | grep flamingo\n\n# Update CF7 form recipient to the admin email (not a non-existent address)\ndocker compose exec wordpress wp --allow-root post list --post_type=wpcf7_contact_form --fields=ID,post_title\n# For each form, verify the recipient matches EMAIL:\ndocker compose exec wordpress wp --allow-root post meta get \u003CFORM_ID> _mail\n# If recipient is wrong, update it via WP Admin → Contact → Forms → Edit\n```\n\nInquiries are viewable at: WP Admin → Flamingo → Inbound Messages.\n\n### 6d. Configure Imagify\n\nAskUserQuestion: \"Do you have an Imagify API key? (Free signup at imagify.io, 20MB\u002Fmonth free tier)\"\n- Yes → Collect `IMAGIFY_API_KEY`\n- Skip for now → Remind user to configure later in Settings → Imagify\n\n### 6e. Configure WP Super Cache\n\n```bash\ndocker compose exec wordpress wp --allow-root super-cache enable 2>\u002Fdev\u002Fnull || true\n```\n\nIf WP-CLI doesn't support it, tell the user to go to Settings → WP Super Cache:\n1. Enable Caching\n2. Advanced → Use mod_rewrite\n\n### 6f. Jetpack Boost\n\nTell the user to enable in the admin panel:\n- Critical CSS generation\n- Lazy image loading\n- Concatenate JS\u002FCSS\n\n---\n\n## Phase 7: Multilingual + SEO\n\n### 7a. Polylang configuration\n\nConfigure based on the `LANGUAGES` list from Phase 1:\n\n```bash\n# Set English as default language\ndocker compose exec wordpress wp --allow-root pll lang create \"English\" en en_US\n```\n\nAdd each selected language:\n- Chinese: `wp pll lang create \"Chinese\" zh zh_CN`\n- Russian: `wp pll lang create \"Russian\" ru ru_RU`\n- Spanish: `wp pll lang create \"Spanish\" es es_ES`\n- French: `wp pll lang create \"French\" fr fr_FR`\n- Arabic: `wp pll lang create \"Arabic\" ar ar`\n\nNote: Polylang WP-CLI support may be limited. If commands fail, guide the user to add languages manually in Languages → Settings.\n\n### 7b. Rank Math SEO configuration\n\nGuide the user through the Rank Math setup wizard:\n1. Business Type → Select \"Company\"\n2. Company Name → `COMPANY_EN`\n3. Website URL → `https:\u002F\u002F${DOMAIN}`\n4. Social Profiles → If available\n5. Sitemap Settings → Enable XML Sitemap\n6. Schema → Organization\n\n### 7c. Create base pages\n\n```bash\ndocker compose exec wordpress bash -c '\nwp --allow-root post create --post_type=page --post_title=\"Home\" --post_status=publish --post_content=\"\u003C!-- wp:paragraph -->\u003Cp>Welcome to '\"${COMPANY_EN}\"'. We specialize in '\"${PRODUCTS}\"'.\u003C\u002Fp>\u003C!-- \u002Fwp:paragraph -->\"\nwp --allow-root post create --post_type=page --post_title=\"About Us\" --post_status=publish --post_content=\"\u003C!-- wp:paragraph -->\u003Cp>About '\"${COMPANY_EN}\"'\u003C\u002Fp>\u003C!-- \u002Fwp:paragraph -->\"\nwp --allow-root post create --post_type=page --post_title=\"Products\" --post_status=publish --post_content=\"\u003C!-- wp:paragraph -->\u003Cp>Our product catalog\u003C\u002Fp>\u003C!-- \u002Fwp:paragraph -->\"\nwp --allow-root post create --post_type=page --post_title=\"Contact\" --post_status=publish --post_content=\"\u003C!-- wp:paragraph -->\u003Cp>Get in touch with us. WhatsApp: '\"${WHATSAPP}\"' Email: '\"${EMAIL}\"'\u003C\u002Fp>\u003C!-- \u002Fwp:paragraph -->[contact-form-7]\"\nwp --allow-root post create --post_type=page --post_title=\"FAQ\" --post_status=publish --post_content=\"\u003C!-- wp:paragraph -->\u003Cp>Frequently Asked Questions\u003C\u002Fp>\u003C!-- \u002Fwp:paragraph -->\"\nwp --allow-root post create --post_type=page --post_title=\"Blog\" --post_status=publish --post_content=\"\"\n'\n\n# Set Home as front page, Blog as posts page\nHOME_ID=$(docker compose exec wordpress wp --allow-root post list --post_type=page --name=home --field=ID)\nBLOG_ID=$(docker compose exec wordpress wp --allow-root post list --post_type=page --name=blog --field=ID)\ndocker compose exec wordpress wp --allow-root option update show_on_front page\ndocker compose exec wordpress wp --allow-root option update page_on_front $HOME_ID\ndocker compose exec wordpress wp --allow-root option update page_for_posts $BLOG_ID\n```\n\n### 7d. Create navigation menu\n\n```bash\ndocker compose exec wordpress bash -c '\nwp --allow-root menu create \"Main Menu\"\nwp --allow-root menu item add-post \"Main Menu\" $(wp --allow-root post list --post_type=page --name=home --field=ID) --title=\"Home\"\nwp --allow-root menu item add-post \"Main Menu\" $(wp --allow-root post list --post_type=page --name=about-us --field=ID) --title=\"About\"\nwp --allow-root menu item add-post \"Main Menu\" $(wp --allow-root post list --post_type=page --name=products --field=ID) --title=\"Products\"\nwp --allow-root menu item add-post \"Main Menu\" $(wp --allow-root post list --post_type=page --name=faq --field=ID) --title=\"FAQ\"\nwp --allow-root menu item add-post \"Main Menu\" $(wp --allow-root post list --post_type=page --name=blog --field=ID) --title=\"Blog\"\nwp --allow-root menu item add-post \"Main Menu\" $(wp --allow-root post list --post_type=page --name=contact --field=ID) --title=\"Contact\"\nwp --allow-root menu location assign \"Main Menu\" primary\n'\n```\n\n---\n\n## Phase 8: Cloudflare + Performance\n\n### 8a. Cloudflare DNS\n\nAskUserQuestion: \"Are you using Cloudflare for DNS management?\"\n- **Yes** → Guide configuration\n- **No** → Skip Cloudflare section, only do local performance optimization\n\n**Cloudflare configuration guide:**\n\n1. Add site `DOMAIN` in Cloudflare Dashboard\n2. Change domain NS records to Cloudflare-provided nameservers\n3. Add DNS records:\n   - `@` → A → `SERVER_IP` (Proxied)\n   - `www` → CNAME → `DOMAIN` (Proxied)\n\n### 8b. SSL\u002FTLS settings\n\nIn Cloudflare Dashboard:\n- SSL\u002FTLS → Overview → Full (Strict)\n- Edge Certificates → Always Use HTTPS → On\n- Edge Certificates → Minimum TLS Version → 1.2\n- Edge Certificates → Automatic HTTPS Rewrites → On\n\n### 8c. Cache rules\n\nIn Cloudflare Dashboard → Caching:\n- Caching Level → Standard\n- Browser Cache TTL → Respect Existing Headers\n- Always Online → On\n\nPage Rules (if free quota available):\n- `*${DOMAIN}\u002Fwp-admin\u002F*` → Cache Level: Bypass\n- `*${DOMAIN}\u002Fwp-login.php*` → Cache Level: Bypass\n- `*${DOMAIN}\u002F*` → Cache Level: Cache Everything, Edge TTL: 2 hours\n\n### 8d. Verify triple-layer cache\n\n```bash\n# Test 1: Check Nginx proxy cache\ncurl -I https:\u002F\u002F${DOMAIN} 2>\u002Fdev\u002Fnull | grep -i x-cache-status\n# Expected: X-Cache-Status: HIT (on second request)\n\n# Test 2: Check Cloudflare cache\ncurl -I https:\u002F\u002F${DOMAIN} 2>\u002Fdev\u002Fnull | grep -i cf-cache-status\n# Expected: cf-cache-status: HIT\n\n# Test 3: Check WP Super Cache\ndocker compose exec wordpress ls \u002Fvar\u002Fwww\u002Fhtml\u002Fwp-content\u002Fcache\u002Fsupercache\u002F 2>\u002Fdev\u002Fnull && echo \"SUPER_CACHE_OK\" || echo \"SUPER_CACHE_EMPTY\"\n```\n\n### 8e. PageSpeed test\n\nTell the user to visit Google PageSpeed Insights: `https:\u002F\u002Fpagespeed.web.dev\u002Fanalysis?url=https:\u002F\u002F${DOMAIN}`\n\nTarget metrics:\n- Desktop Score: >= 75\n- Mobile Score: >= 60\n- TTFB: \u003C 500ms\n- LCP: \u003C 2.5s\n\n---\n\n## Phase 8.5: GEO (Generative Engine Optimization)\n\n### 8.5a. Deploy GEO functions\n\n```bash\n# Copy GEO functions to child theme\ndocker compose exec wordpress bash -c '\ncurl -sL https:\u002F\u002Fraw.githubusercontent.com\u002FiPythoning\u002Fwordpress-trade-starter\u002Fmain\u002Fassets\u002Fgeo-functions.php \\\n  -o \u002Fvar\u002Fwww\u002Fhtml\u002Fwp-content\u002Fthemes\u002Fastra-child\u002Fgeo-functions.php\n'\n```\n\nAdd configuration to child theme's functions.php:\n\n```bash\ndocker compose exec wordpress bash -c '\ncat >> \u002Fvar\u002Fwww\u002Fhtml\u002Fwp-content\u002Fthemes\u002Fastra-child\u002Ffunctions.php \u003C\u003C \"GEO\"\n\n\u002F\u002F GEO Configuration\ndefine(\"GEO_SAMEAS\", []);  \u002F\u002F Add Wikipedia, LinkedIn, YouTube URLs later\ndefine(\"GEO_LANGUAGES\", [${LANGUAGES_ARRAY}]);\ndefine(\"GEO_CONTACT_EMAIL\", \"${EMAIL}\");\ndefine(\"GEO_CONTACT_PHONE\", \"${WHATSAPP}\");\nrequire_once get_stylesheet_directory() . \"\u002Fgeo-functions.php\";\nGEO\n'\n```\n\nAskUserQuestion: \"Do you have profiles on these platforms? (We'll add them to your schema for AI recognition)\" (multiSelect)\n- Wikipedia page\n- LinkedIn company page\n- YouTube channel\n- Twitter\u002FX account\n- None yet — Skip\n\nFor each selected platform, collect the URL and add to `GEO_SAMEAS` array.\n\n### 8.5b. Verify GEO deployment\n\n```bash\n# Check robots.txt has AI bots\ncurl -s https:\u002F\u002F${DOMAIN}\u002Frobots.txt | grep -c \"User-agent:\"\n# Expected: 15+ entries (standard + AI tier 1 + tier 2 + SEO bots)\n\n# Check llms.txt auto-generation\ncurl -s https:\u002F\u002F${DOMAIN}\u002Fllms.txt | head -5\n# Expected: \"# COMPANY_NAME\" followed by description\n\n# Check JSON-LD schema\ncurl -s https:\u002F\u002F${DOMAIN}\u002F | grep -o '\"@type\":\"[^\"]*\"' | sort -u\n# Expected: Organization, WebSite, BreadcrumbList\n```\n\n### 8.5c. Cloudflare AI bot access\n\n**Critical:** Cloudflare's \"Managed robots.txt\" blocks AI crawlers by default.\n\nTell the user: Go to Cloudflare Dashboard → Security → Bots → **Disable \"Managed robots.txt\"**.\n\nWithout this, all GEO work is nullified.\n\n---\n\n## Phase 9: Security Hardening + Verification\n\n### 9a. File permissions\n\n```bash\n# WordPress file permission best practices\ndocker compose exec wordpress bash -c '\nfind \u002Fvar\u002Fwww\u002Fhtml -type d -exec chmod 755 {} \\;\nfind \u002Fvar\u002Fwww\u002Fhtml -type f -exec chmod 644 {} \\;\nchmod 440 \u002Fvar\u002Fwww\u002Fhtml\u002Fwp-config.php\n'\n```\n\n### 9b. Block xmlrpc.php\n\nAlready handled in nginx.conf via skip_cache rules. Additional blocking:\n\n```bash\ndocker compose exec wordpress bash -c '\ncat >> \u002Fvar\u002Fwww\u002Fhtml\u002F.htaccess \u003C\u003C \"HTACCESS\"\n\n# Block xmlrpc.php\n\u003CFiles xmlrpc.php>\n    Require all denied\n\u003C\u002FFiles>\nHTACCESS\n'\n```\n\n### 9c. Backup cron\n\n```bash\n# Database backup script\ncat > \u002Fopt\u002Fwordpress\u002Fbackup.sh \u003C\u003C 'BACKUP'\n#!\u002Fbin\u002Fbash\nBACKUP_DIR=\"\u002Fopt\u002Fwordpress\u002Fbackups\"\nmkdir -p $BACKUP_DIR\nDATE=$(date +%Y%m%d_%H%M%S)\ndocker compose -f \u002Fopt\u002Fwordpress\u002Fdocker-compose.yml exec -T db mysqldump -u root -p${MYSQL_ROOT_PASSWORD} wordpress > $BACKUP_DIR\u002Fdb_$DATE.sql\ngzip $BACKUP_DIR\u002Fdb_$DATE.sql\n# Keep only last 7 days of backups\nfind $BACKUP_DIR -name \"*.sql.gz\" -mtime +7 -delete\nBACKUP\nchmod +x \u002Fopt\u002Fwordpress\u002Fbackup.sh\n\n# Daily backup at 2am\n(crontab -l 2>\u002Fdev\u002Fnull; echo \"0 2 * * * \u002Fopt\u002Fwordpress\u002Fbackup.sh\") | crontab -\n```\n\n### 9d. UptimeRobot monitoring\n\nAskUserQuestion: \"Would you like to set up free UptimeRobot monitoring?\"\n- **Yes** → Guide user to register at uptimerobot.com and add:\n  - Monitor Type: HTTPS\n  - URL: `https:\u002F\u002F${DOMAIN}`\n  - Interval: 5 minutes\n  - Alert Contact: `EMAIL`\n- **Skip** → Continue\n\n### 9e. Final verification checklist\n\nRun checks and report:\n\n```bash\necho \"=== WordPress Trade Site Verification Checklist ===\"\n\n# 1. Container status\ndocker compose -f \u002Fopt\u002Fwordpress\u002Fdocker-compose.yml ps --format \"table {{.Name}}\\t{{.Status}}\"\n\n# 2. HTTPS\ncurl -sI https:\u002F\u002F${DOMAIN} | head -1\n\n# 3. WordPress version\ndocker compose -f \u002Fopt\u002Fwordpress\u002Fdocker-compose.yml exec wordpress wp --allow-root core version\n\n# 4. Active plugins\ndocker compose -f \u002Fopt\u002Fwordpress\u002Fdocker-compose.yml exec wordpress wp --allow-root plugin list --status=active --format=table\n\n# 5. Published pages\ndocker compose -f \u002Fopt\u002Fwordpress\u002Fdocker-compose.yml exec wordpress wp --allow-root post list --post_type=page --post_status=publish --format=table\n\n# 6. SSL certificate expiry\necho | openssl s_client -connect ${DOMAIN}:443 -servername ${DOMAIN} 2>\u002Fdev\u002Fnull | openssl x509 -noout -dates\n\n# 7. Cache status\ncurl -sI https:\u002F\u002F${DOMAIN} | grep -iE \"x-cache-status|cf-cache-status\"\n```\n\nOutput a summary report:\n\n```\nAll 3 containers running (WordPress + MySQL + Nginx)\nHTTPS certificate valid, expires: YYYY-MM-DD\nWordPress 6.7, X active plugins installed\n6 base pages created + navigation menu\nMultilingual configured with X languages\nSEO (Rank Math) enabled\nTriple-layer cache active\nDatabase auto-backup configured\nxmlrpc.php blocked\nFile permissions hardened\nGEO: robots.txt has AI bot tiers, llms.txt serving, JSON-LD schemas active\n\nSite URL:  https:\u002F\u002F${DOMAIN}\nAdmin URL: https:\u002F\u002F${DOMAIN}\u002Fwp-admin\nEmail:     ${EMAIL}\nWhatsApp:  ${WHATSAPP}\n```\n\n---\n\n## Troubleshooting\n\n**Docker containers fail to start:** Check `docker compose logs \u003Cservice>`. Common issues: port already in use (`lsof -i :80`), insufficient disk space (`df -h`).\n\n**SSL certificate acquisition fails:** Confirm DNS has propagated (`dig ${DOMAIN}`), port 80 is accessible. Let's Encrypt limits to 5 certificates per domain per week.\n\n**WordPress setup wizard doesn't appear:** Check `docker compose logs wordpress`. If database connection fails, check if .env passwords contain special characters (need escaping).\n\n**Plugin installation fails:** When WP-CLI fails, install manually from the admin panel (Plugins → Add New). Ensure the WordPress container can reach wordpress.org.\n\n**Low PageSpeed score:** Confirm all three cache layers are active, Imagify has optimized existing images, Jetpack Boost Critical CSS has been generated. Clear all caches and retest.\n\n**SSH connection drops:** Use `screen` or `tmux` for long-running commands. Reconnect with `screen -r` to resume session.\n","# WordPress Trade Site Builder\n\nDeploy a production-ready WordPress trade site from scratch through 9 interactive phases. Based on the [wordpress-trade-starter](https:\u002F\u002Fgithub.com\u002FiPythoning\u002Fwordpress-trade-starter) template.\n\n**Principle:** Automate everything possible. Only pause when user decisions or information are required. When errors occur, diagnose and fix them proactively — don't tell the user to go fix things themselves.\n\n**Interaction:** Use `AskUserQuestion` for all user-facing questions. Report progress after each phase, then continue to the next.\n\n**Data flow:** Information collected in each phase (business info, SSH details, domain, etc.) is reused in subsequent phases. Key data is labeled with variable names for reference.\n\n---\n\n## Phase 1: Collect Business Information\n\nBefore any technical work, understand the user's business needs.\n\nAskUserQuestion (collect sequentially):\n\n1. **Company name** — \"What is your company name? (Both local language and English)\"\n   - Example: TitanPuls Technology Co., Ltd.\n   - Record as `COMPANY_EN` (and `COMPANY_LOCAL` if provided)\n\n2. **Main products** — \"What products do you mainly sell? (Brief description)\"\n   - Example: Semi-trailers, construction machinery\n   - Record as `PRODUCTS`\n\n3. **Target markets** — \"Which markets do you primarily target?\" (multiSelect)\n   - Africa\n   - Middle East\n   - Southeast Asia\n   - Latin America\n   - Europe\n   - North America\n   - Record as `TARGET_MARKETS`\n\n4. **Languages** — \"Which languages should your website support?\" (multiSelect, recommend based on target markets)\n   - English (Recommended)\n   - Chinese\n   - Russian\n   - Spanish\n   - French\n   - Arabic\n   - Record as `LANGUAGES`\n\n5. **Contact info** — \"How should customers reach you?\"\n   - WhatsApp number (with country code)\n   - Business email\n   - Record as `WHATSAPP` and `EMAIL`\n\nSummary confirmation: Display collected information and AskUserQuestion to confirm correctness.\n\n---\n\n## Phase 2: Server Preparation\n\n### 2a. Server status\n\nAskUserQuestion: \"Do you already have a Linux server?\"\n- **I have a server** — Collect SSH details\n- **I need guidance** — Recommend datacenter locations and providers based on `TARGET_MARKETS`\n\n**Purchase guidance** (if needed):\n\nRecommend based on target market:\n| Target Market | Recommended DC | Recommended Providers |\n|--------------|----------------|----------------------|\n| Europe\u002FAfrica | Germany\u002FNetherlands | Contabo, Hetzner |\n| North America | US East\u002FWest Coast | DigitalOcean, Vultr |\n| Southeast Asia | Singapore | Vultr, Alibaba Cloud |\n| Middle East | Dubai\u002FBahrain | AWS, Alibaba Cloud |\n| Latin America | US Miami | DigitalOcean |\n\nRecommended specs: 2 cores \u002F 2GB RAM \u002F 40GB SSD ($10-20\u002Fmonth). Tell user to continue after purchase.\n\n### 2b. SSH connection\n\nAskUserQuestion: \"Please provide your server SSH details:\"\n- IP address → `SERVER_IP`\n- SSH port (default 22) → `SSH_PORT`\n- Username (usually root) → `SSH_USER`\n- Authentication: password or SSH key\n\nVerify connection:\n\n```bash\nssh -o ConnectTimeout=10 -o StrictHostKeyChecking=no -p ${SSH_PORT} ${SSH_USER}@${SERVER_IP} \"echo CONNECTION_OK && uname -a && free -m && df -h \u002F\"\n```\n\n- CONNECTION_OK → Continue\n- Connection failed → Check IP\u002Fport\u002Fcredentials, prompt user to correct\n\n### 2c. Server initialization\n\nExecute via SSH:\n\n```bash\n# System update\napt update && apt upgrade -y\n\n# Set timezone\ntimedatectl set-timezone UTC\n\n# Create swap (if RAM \u003C= 2GB and no swap exists)\nif [ $(free -m | awk '\u002F^Mem:\u002F{print $2}') -le 2048 ] && [ ! -f \u002Fswapfile ]; then\n    fallocate -l 2G \u002Fswapfile\n    chmod 600 \u002Fswapfile\n    mkswap \u002Fswapfile\n    swapon \u002Fswapfile\n    echo '\u002Fswapfile none swap sw 0 0' >> \u002Fetc\u002Ffstab\nfi\n\n# Firewall\nufw allow 22\u002Ftcp\nufw allow 80\u002Ftcp\nufw allow 443\u002Ftcp\nufw --force enable\n\n# Essential tools\napt install -y curl git unzip htop\n```\n\nVerify: `ufw status` shows 22\u002F80\u002F443 open.\n\n---\n\n## Phase 3: Docker Deployment\n\n### 3a. Install Docker\n\n```bash\nif ! command -v docker &>\u002Fdev\u002Fnull; then\n    curl -fsSL https:\u002F\u002Fget.docker.com | sh\n    systemctl enable docker && systemctl start docker\nfi\ndocker compose version || apt-get install -y docker-compose-plugin\n```\n\nVerify: `docker compose version` outputs a version number.\n\n### 3b. Clone template\n\n```bash\ncd \u002Fopt\ngit clone https:\u002F\u002Fgithub.com\u002FiPythoning\u002Fwordpress-trade-starter.git wordpress\ncd \u002Fopt\u002Fwordpress\n```\n\n### 3c. Generate .env\n\nAskUserQuestion: \"Please provide the following:\"\n- Domain name (e.g. example.com) → `DOMAIN`\n- MySQL root password (auto-generate recommended) → `MYSQL_ROOT_PASSWORD`\n- MySQL user password (auto-generate recommended) → `MYSQL_PASSWORD`\n\nIf user chooses auto-generation:\n```bash\nMYSQL_ROOT_PASSWORD=$(openssl rand -base64 16)\nMYSQL_PASSWORD=$(openssl rand -base64 16)\n```\n\nWrite .env:\n```bash\ncat > \u002Fopt\u002Fwordpress\u002F.env \u003C\u003C EOF\nMYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}\nMYSQL_DATABASE=wordpress\nMYSQL_USER=wordpress\nMYSQL_PASSWORD=${MYSQL_PASSWORD}\nDOMAIN=${DOMAIN}\nEMAIL=${EMAIL}\nEOF\n```\n\n**Important:** Display the generated passwords to the user and remind them to save securely.\n\n### 3d. Configure Nginx\n\n```bash\nsed -i \"s\u002FYOUR_DOMAIN\u002F${DOMAIN}\u002Fg\" \u002Fopt\u002Fwordpress\u002Fnginx.conf\n```\n\n### 3e. Start containers\n\n```bash\ncd \u002Fopt\u002Fwordpress\ndocker compose up -d\n```\n\nVerify:\n```bash\ndocker compose ps\n# Confirm all three containers (db, wordpress, nginx) are running\u002Fhealthy\n```\n\nWait for WordPress to be ready:\n```bash\nfor i in $(seq 1 30); do\n    curl -sf http:\u002F\u002Flocalhost > \u002Fdev\u002Fnull 2>&1 && break\n    sleep 2\ndone\n```\n\n- All 3 containers running → Continue\n- db unhealthy → Check `docker compose logs db`, common cause is password format issues\n- wordpress not starting → Check `docker compose logs wordpress`\n\n---\n\n## Phase 4: SSL Certificate\n\n### 4a. Choose method\n\nAskUserQuestion: \"Which SSL certificate method?\"\n- **Let's Encrypt (Recommended)** — Free, auto-renewal, requires domain A record pointing to server IP\n- **Cloudflare Origin Certificate** — For users already using Cloudflare proxy\n\n### 4b-A. Let's Encrypt\n\nPrerequisite: Domain A records must point to `SERVER_IP`. If not configured, guide the user to add in their DNS panel:\n- `DOMAIN` → A → `SERVER_IP`\n- `www.DOMAIN` → A → `SERVER_IP`\n\n```bash\n# Stop nginx to free port 80\ncd \u002Fopt\u002Fwordpress && docker compose stop nginx\n\napt install -y certbot\ncertbot certonly --standalone -d ${DOMAIN} -d www.${DOMAIN} --email ${EMAIL} --agree-tos --non-interactive\n\nmkdir -p \u002Fopt\u002Fwordpress\u002Fssl\ncp \u002Fetc\u002Fletsencrypt\u002Flive\u002F${DOMAIN}\u002Ffullchain.pem \u002Fopt\u002Fwordpress\u002Fssl\u002F\ncp \u002Fetc\u002Fletsencrypt\u002Flive\u002F${DOMAIN}\u002Fprivkey.pem \u002Fopt\u002Fwordpress\u002Fssl\u002F\n\n# Auto-renewal cron\n(crontab -l 2>\u002Fdev\u002Fnull; echo \"0 3 * * * certbot renew --quiet --pre-hook 'cd \u002Fopt\u002Fwordpress && docker compose stop nginx' --post-hook 'cp \u002Fetc\u002Fletsencrypt\u002Flive\u002F${DOMAIN}\u002Ffullchain.pem \u002Fopt\u002Fwordpress\u002Fssl\u002F && cp \u002Fetc\u002Fletsencrypt\u002Flive\u002F${DOMAIN}\u002Fprivkey.pem \u002Fopt\u002Fwordpress\u002Fssl\u002F && cd \u002Fopt\u002Fwordpress && docker compose start nginx'\") | crontab -\n\n# Restart nginx\ndocker compose start nginx\n```\n\n### 4b-B. Cloudflare Origin Certificate\n\nGuide the user through Cloudflare Dashboard:\n1. SSL\u002FTLS → Origin Server → Create Certificate\n2. Choose RSA, 15-year validity\n3. Copy Certificate and Private Key\n\n```bash\nmkdir -p \u002Fopt\u002Fwordpress\u002Fssl\n# User pastes certificate content\ncat > \u002Fopt\u002Fwordpress\u002Fssl\u002Ffullchain.pem \u003C\u003C 'EOF'\n\u003Cuser pastes certificate here>\nEOF\ncat > \u002Fopt\u002Fwordpress\u002Fssl\u002Fprivkey.pem \u003C\u003C 'EOF'\n\u003Cuser pastes private key here>\nEOF\n```\n\n### 4c. Verify HTTPS\n\n```bash\ndocker compose restart nginx\ncurl -I https:\u002F\u002F${DOMAIN} 2>\u002Fdev\u002Fnull | head -5\n```\n\n- HTTP\u002F2 200 → Success\n- Connection failed → Check DNS resolution, certificate paths, nginx logs\n\n---\n\n## Phase 5: WordPress Initialization\n\n### 5a. Setup wizard\n\nTell the user to open `https:\u002F\u002F${DOMAIN}\u002Fwp-admin\u002Finstall.php` in their browser and fill in:\n- Site Title: `COMPANY_EN`\n- Username: suggest avoiding \"admin\" (security)\n- Password: strong password\n- Email: `EMAIL`\n\nAskUserQuestion: \"Have you completed the WordPress setup wizard?\"\n\n### 5b. Install WP-CLI\n\n```bash\ndocker compose exec wordpress bash -c '\ncurl -O https:\u002F\u002Fraw.githubusercontent.com\u002Fwp-cli\u002Fbuilds\u002Fgh-pages\u002Fphar\u002Fwp-cli.phar\nchmod +x wp-cli.phar\nmv wp-cli.phar \u002Fusr\u002Flocal\u002Fbin\u002Fwp\n'\n```\n\nVerify: `docker compose exec wordpress wp --info --allow-root`\n\n### 5c. Base configuration\n\n```bash\ndocker compose exec wordpress wp --allow-root option update blogname \"${COMPANY_EN}\"\ndocker compose exec wordpress wp --allow-root option update blogdescription \"${PRODUCTS} - ${COMPANY_EN}\"\ndocker compose exec wordpress wp --allow-root option update timezone_string \"UTC\"\ndocker compose exec wordpress wp --allow-root option update date_format \"Y-m-d\"\ndocker compose exec wordpress wp --allow-root option update permalink_structure \"\u002F%postname%\u002F\"\n\n# Delete default content\ndocker compose exec wordpress wp --allow-root post delete 1 2 --force\ndocker compose exec wordpress wp --allow-root widget reset --all\n```\n\n---\n\n## Phase 6: Theme & Plugin Installation\n\n### 6a. Astra theme + Child Theme\n\n```bash\ndocker compose exec wordpress wp --allow-root theme install astra --activate\n\n# Create Child Theme\ndocker compose exec wordpress bash -c '\nmkdir -p \u002Fvar\u002Fwww\u002Fhtml\u002Fwp-content\u002Fthemes\u002Fastra-child\ncat > \u002Fvar\u002Fwww\u002Fhtml\u002Fwp-content\u002Fthemes\u002Fastra-child\u002Fstyle.css \u003C\u003C \"CSS\"\n\u002F*\nTheme Name: Astra Child\nTemplate: astra\nVersion: 1.0.0\n*\u002F\nCSS\ncat > \u002Fvar\u002Fwww\u002Fhtml\u002Fwp-content\u002Fthemes\u002Fastra-child\u002Ffunctions.php \u003C\u003C \"PHP\"\n\u003C?php\nadd_action(\"wp_enqueue_scripts\", function() {\n    wp_enqueue_style(\"parent-style\", get_template_directory_uri() . \"\u002Fstyle.css\");\n});\nPHP\n'\ndocker compose exec wordpress wp --allow-root theme activate astra-child\n```\n\n### 6b. Batch install plugins\n\nInstall plugins one by one to track failures:\n\n```bash\nPLUGINS=\"elementor seo-by-rank-math wp-super-cache imagify jetpack-boost polylang contact-form-7 flamingo chaty ecommerce-product-catalog\"\nfor plugin in $PLUGINS; do\n    docker compose exec wordpress wp --allow-root plugin install $plugin --activate 2>&1 || echo \"WARN: $plugin install failed, manual install needed\"\ndone\n```\n\nNote: Some plugins may not be in the wordpress.org directory. For failed installs, inform the user to install manually from the admin panel (Plugins → Add New).\n\n### 6c. Configure CF7 + Flamingo\n\n**Critical:** CF7 only sends emails by default — if the recipient email is wrong, all inquiries are lost permanently. Flamingo stores every submission in the WP database as a safety net.\n\nAfter installing, verify:\n\n```bash\n# Verify Flamingo is active (auto-stores CF7 submissions)\ndocker compose exec wordpress wp --allow-root plugin list --status=active --field=name | grep flamingo\n\n# Update CF7 form recipient to the admin email (not a non-existent address)\ndocker compose exec wordpress wp --allow-root post list --post_type=wpcf7_contact_form --fields=ID,post_title\n# For each form, verify the recipient matches EMAIL:\ndocker compose exec wordpress wp --allow-root post meta get \u003CFORM_ID> _mail\n# If recipient is wrong, update it via WP Admin → Contact → Forms → Edit\n```\n\nInquiries are viewable at: WP Admin → Flamingo → Inbound Messages.\n\n### 6d. Configure Imagify\n\nAskUserQuestion: \"Do you have an Imagify API key? (Free signup at imagify.io, 20MB\u002Fmonth free tier)\"\n- Yes → Collect `IMAGIFY_API_KEY`\n- Skip for now → Remind user to configure later in Settings → Imagify\n\n### 6e. Configure WP Super Cache\n\n```bash\ndocker compose exec wordpress wp --allow-root super-cache enable 2>\u002Fdev\u002Fnull || true\n```\n\nIf WP-CLI doesn't support it, tell the user to go to Settings → WP Super Cache:\n1. Enable Caching\n2. Advanced → Use mod_rewrite\n\n### 6f. Jetpack Boost\n\nTell the user to enable in the admin panel:\n- Critical CSS generation\n- Lazy image loading\n- Concatenate JS\u002FCSS\n\n---\n\n## Phase 7: Multilingual + SEO\n\n### 7a. Polylang configuration\n\nConfigure based on the `LANGUAGES` list from Phase 1:\n\n```bash\n# Set English as default language\ndocker compose exec wordpress wp --allow-root pll lang create \"English\" en en_US\n```\n\nAdd each selected language:\n- Chinese: `wp pll lang create \"Chinese\" zh zh_CN`\n- Russian: `wp pll lang create \"Russian\" ru ru_RU`\n- Spanish: `wp pll lang create \"Spanish\" es es_ES`\n- French: `wp pll lang create \"French\" fr fr_FR`\n- Arabic: `wp pll lang create \"Arabic\" ar ar`\n\nNote: Polylang WP-CLI support may be limited. If commands fail, guide the user to add languages manually in Languages → Settings.\n\n### 7b. Rank Math SEO configuration\n\nGuide the user through the Rank Math setup wizard:\n1. Business Type → Select \"Company\"\n2. Company Name → `COMPANY_EN`\n3. Website URL → `https:\u002F\u002F${DOMAIN}`\n4. Social Profiles → If available\n5. Sitemap Settings → Enable XML Sitemap\n6. Schema → Organization\n\n### 7c. Create base pages\n\n```bash\ndocker compose exec wordpress bash -c '\nwp --allow-root post create --post_type=page --post_title=\"Home\" --post_status=publish --post_content=\"\u003C!-- wp:paragraph -->\u003Cp>Welcome to '\"${COMPANY_EN}\"'. We specialize in '\"${PRODUCTS}\"'.\u003C\u002Fp>\u003C!-- \u002Fwp:paragraph -->\"\nwp --allow-root post create --post_type=page --post_title=\"About Us\" --post_status=publish --post_content=\"\u003C!-- wp:paragraph -->\u003Cp>About '\"${COMPANY_EN}\"'\u003C\u002Fp>\u003C!-- \u002Fwp:paragraph -->\"\nwp --allow-root post create --post_type=page --post_title=\"Products\" --post_status=publish --post_content=\"\u003C!-- wp:paragraph -->\u003Cp>Our product catalog\u003C\u002Fp>\u003C!-- \u002Fwp:paragraph -->\"\nwp --allow-root post create --post_type=page --post_title=\"Contact\" --post_status=publish --post_content=\"\u003C!-- wp:paragraph -->\u003Cp>Get in touch with us. WhatsApp: '\"${WHATSAPP}\"' Email: '\"${EMAIL}\"'\u003C\u002Fp>\u003C!-- \u002Fwp:paragraph -->[contact-form-7]\"\nwp --allow-root post create --post_type=page --post_title=\"FAQ\" --post_status=publish --post_content=\"\u003C!-- wp:paragraph -->\u003Cp>Frequently Asked Questions\u003C\u002Fp>\u003C!-- \u002Fwp:paragraph -->\"\nwp --allow-root post create --post_type=page --post_title=\"Blog\" --post_status=publish --post_content=\"\"\n'\n\n# Set Home as front page, Blog as posts page\nHOME_ID=$(docker compose exec wordpress wp --allow-root post list --post_type=page --name=home --field=ID)\nBLOG_ID=$(docker compose exec wordpress wp --allow-root post list --post_type=page --name=blog --field=ID)\ndocker compose exec wordpress wp --allow-root option update show_on_front page\ndocker compose exec wordpress wp --allow-root option update page_on_front $HOME_ID\ndocker compose exec wordpress wp --allow-root option update page_for_posts $BLOG_ID\n```\n\n### 7d. Create navigation menu\n\n```bash\ndocker compose exec wordpress bash -c '\nwp --allow-root menu create \"Main Menu\"\nwp --allow-root menu item add-post \"Main Menu\" $(wp --allow-root post list --post_type=page --name=home --field=ID) --title=\"Home\"\nwp --allow-root menu item add-post \"Main Menu\" $(wp --allow-root post list --post_type=page --name=about-us --field=ID) --title=\"About\"\nwp --allow-root menu item add-post \"Main Menu\" $(wp --allow-root post list --post_type=page --name=products --field=ID) --title=\"Products\"\nwp --allow-root menu item add-post \"Main Menu\" $(wp --allow-root post list --post_type=page --name=faq --field=ID) --title=\"FAQ\"\nwp --allow-root menu item add-post \"Main Menu\" $(wp --allow-root post list --post_type=page --name=blog --field=ID) --title=\"Blog\"\nwp --allow-root menu item add-post \"Main Menu\" $(wp --allow-root post list --post_type=page --name=contact --field=ID) --title=\"Contact\"\nwp --allow-root menu location assign \"Main Menu\" primary\n'\n```\n\n---\n\n## Phase 8: Cloudflare + Performance\n\n### 8a. Cloudflare DNS\n\nAskUserQuestion: \"Are you using Cloudflare for DNS management?\"\n- **Yes** → Guide configuration\n- **No** → Skip Cloudflare section, only do local performance optimization\n\n**Cloudflare configuration guide:**\n\n1. Add site `DOMAIN` in Cloudflare Dashboard\n2. Change domain NS records to Cloudflare-provided nameservers\n3. Add DNS records:\n   - `@` → A → `SERVER_IP` (Proxied)\n   - `www` → CNAME → `DOMAIN` (Proxied)\n\n### 8b. SSL\u002FTLS settings\n\nIn Cloudflare Dashboard:\n- SSL\u002FTLS → Overview → Full (Strict)\n- Edge Certificates → Always Use HTTPS → On\n- Edge Certificates → Minimum TLS Version → 1.2\n- Edge Certificates → Automatic HTTPS Rewrites → On\n\n### 8c. Cache rules\n\nIn Cloudflare Dashboard → Caching:\n- Caching Level → Standard\n- Browser Cache TTL → Respect Existing Headers\n- Always Online → On\n\nPage Rules (if free quota available):\n- `*${DOMAIN}\u002Fwp-admin\u002F*` → Cache Level: Bypass\n- `*${DOMAIN}\u002Fwp-login.php*` → Cache Level: Bypass\n- `*${DOMAIN}\u002F*` → Cache Level: Cache Everything, Edge TTL: 2 hours\n\n### 8d. Verify triple-layer cache\n\n```bash\n# Test 1: Check Nginx proxy cache\ncurl -I https:\u002F\u002F${DOMAIN} 2>\u002Fdev\u002Fnull | grep -i x-cache-status\n# Expected: X-Cache-Status: HIT (on second request)\n\n# Test 2: Check Cloudflare cache\ncurl -I https:\u002F\u002F${DOMAIN} 2>\u002Fdev\u002Fnull | grep -i cf-cache-status\n# Expected: cf-cache-status: HIT\n\n# Test 3: Check WP Super Cache\ndocker compose exec wordpress ls \u002Fvar\u002Fwww\u002Fhtml\u002Fwp-content\u002Fcache\u002Fsupercache\u002F 2>\u002Fdev\u002Fnull && echo \"SUPER_CACHE_OK\" || echo \"SUPER_CACHE_EMPTY\"\n```\n\n### 8e. PageSpeed test\n\nTell the user to visit Google PageSpeed Insights: `https:\u002F\u002Fpagespeed.web.dev\u002Fanalysis?url=https:\u002F\u002F${DOMAIN}`\n\nTarget metrics:\n- Desktop Score: >= 75\n- Mobile Score: >= 60\n- TTFB: \u003C 500ms\n- LCP: \u003C 2.5s\n\n---\n\n## Phase 8.5: GEO (Generative Engine Optimization)\n\n### 8.5a. Deploy GEO functions\n\n```bash\n# Copy GEO functions to child theme\ndocker compose exec wordpress bash -c '\ncurl -sL https:\u002F\u002Fraw.githubusercontent.com\u002FiPythoning\u002Fwordpress-trade-starter\u002Fmain\u002Fassets\u002Fgeo-functions.php \\\n  -o \u002Fvar\u002Fwww\u002Fhtml\u002Fwp-content\u002Fthemes\u002Fastra-child\u002Fgeo-functions.php\n'\n```\n\nAdd configuration to child theme's functions.php:\n\n```bash\ndocker compose exec wordpress bash -c '\ncat >> \u002Fvar\u002Fwww\u002Fhtml\u002Fwp-content\u002Fthemes\u002Fastra-child\u002Ffunctions.php \u003C\u003C \"GEO\"\n\n\u002F\u002F GEO Configuration\ndefine(\"GEO_SAMEAS\", []);  \u002F\u002F Add Wikipedia, LinkedIn, YouTube URLs later\ndefine(\"GEO_LANGUAGES\", [${LANGUAGES_ARRAY}]);\ndefine(\"GEO_CONTACT_EMAIL\", \"${EMAIL}\");\ndefine(\"GEO_CONTACT_PHONE\", \"${WHATSAPP}\");\nrequire_once get_stylesheet_directory() . \"\u002Fgeo-functions.php\";\nGEO\n'\n```\n\nAskUserQuestion: \"Do you have profiles on these platforms? (We'll add them to your schema for AI recognition)\" (multiSelect)\n- Wikipedia page\n- LinkedIn company page\n- YouTube channel\n- Twitter\u002FX account\n- None yet — Skip\n\nFor each selected platform, collect the URL and add to `GEO_SAMEAS` array.\n\n### 8.5b. Verify GEO deployment\n\n```bash\n# Check robots.txt has AI bots\ncurl -s https:\u002F\u002F${DOMAIN}\u002Frobots.txt | grep -c \"User-agent:\"\n# Expected: 15+ entries (standard + AI tier 1 + tier 2 + SEO bots)\n\n# Check llms.txt auto-generation\ncurl -s https:\u002F\u002F${DOMAIN}\u002Fllms.txt | head -5\n# Expected: \"# COMPANY_NAME\" followed by description\n\n# Check JSON-LD schema\ncurl -s https:\u002F\u002F${DOMAIN}\u002F | grep -o '\"@type\":\"[^\"]*\"' | sort -u\n# Expected: Organization, WebSite, BreadcrumbList\n```\n\n### 8.5c. Cloudflare AI bot access\n\n**Critical:** Cloudflare's \"Managed robots.txt\" blocks AI crawlers by default.\n\nTell the user: Go to Cloudflare Dashboard → Security → Bots → **Disable \"Managed robots.txt\"**.\n\nWithout this, all GEO work is nullified.\n\n---\n\n## Phase 9: Security Hardening + Verification\n\n### 9a. File permissions\n\n```bash\n# WordPress file permission best practices\ndocker compose exec wordpress bash -c '\nfind \u002Fvar\u002Fwww\u002Fhtml -type d -exec chmod 755 {} \\;\nfind \u002Fvar\u002Fwww\u002Fhtml -type f -exec chmod 644 {} \\;\nchmod 440 \u002Fvar\u002Fwww\u002Fhtml\u002Fwp-config.php\n'\n```\n\n### 9b. Block xmlrpc.php\n\nAlready handled in nginx.conf via skip_cache rules. Additional blocking:\n\n```bash\ndocker compose exec wordpress bash -c '\ncat >> \u002Fvar\u002Fwww\u002Fhtml\u002F.htaccess \u003C\u003C \"HTACCESS\"\n\n# Block xmlrpc.php\n\u003CFiles xmlrpc.php>\n    Require all denied\n\u003C\u002FFiles>\nHTACCESS\n'\n```\n\n### 9c. Backup cron\n\n```bash\n# Database backup script\ncat > \u002Fopt\u002Fwordpress\u002Fbackup.sh \u003C\u003C 'BACKUP'\n#!\u002Fbin\u002Fbash\nBACKUP_DIR=\"\u002Fopt\u002Fwordpress\u002Fbackups\"\nmkdir -p $BACKUP_DIR\nDATE=$(date +%Y%m%d_%H%M%S)\ndocker compose -f \u002Fopt\u002Fwordpress\u002Fdocker-compose.yml exec -T db mysqldump -u root -p${MYSQL_ROOT_PASSWORD} wordpress > $BACKUP_DIR\u002Fdb_$DATE.sql\ngzip $BACKUP_DIR\u002Fdb_$DATE.sql\n# Keep only last 7 days of backups\nfind $BACKUP_DIR -name \"*.sql.gz\" -mtime +7 -delete\nBACKUP\nchmod +x \u002Fopt\u002Fwordpress\u002Fbackup.sh\n\n# Daily backup at 2am\n(crontab -l 2>\u002Fdev\u002Fnull; echo \"0 2 * * * \u002Fopt\u002Fwordpress\u002Fbackup.sh\") | crontab -\n```\n\n### 9d. UptimeRobot monitoring\n\nAskUserQuestion: \"Would you like to set up free UptimeRobot monitoring?\"\n- **Yes** → Guide user to register at uptimerobot.com and add:\n  - Monitor Type: HTTPS\n  - URL: `https:\u002F\u002F${DOMAIN}`\n  - Interval: 5 minutes\n  - Alert Contact: `EMAIL`\n- **Skip** → Continue\n\n### 9e. Final verification checklist\n\nRun checks and report:\n\n```bash\necho \"=== WordPress Trade Site Verification Checklist ===\"\n\n# 1. Container status\ndocker compose -f \u002Fopt\u002Fwordpress\u002Fdocker-compose.yml ps --format \"table {{.Name}}\\t{{.Status}}\"\n\n# 2. HTTPS\ncurl -sI https:\u002F\u002F${DOMAIN} | head -1\n\n# 3. WordPress version\ndocker compose -f \u002Fopt\u002Fwordpress\u002Fdocker-compose.yml exec wordpress wp --allow-root core version\n\n# 4. Active plugins\ndocker compose -f \u002Fopt\u002Fwordpress\u002Fdocker-compose.yml exec wordpress wp --allow-root plugin list --status=active --format=table\n\n# 5. Published pages\ndocker compose -f \u002Fopt\u002Fwordpress\u002Fdocker-compose.yml exec wordpress wp --allow-root post list --post_type=page --post_status=publish --format=table\n\n# 6. SSL certificate expiry\necho | openssl s_client -connect ${DOMAIN}:443 -servername ${DOMAIN} 2>\u002Fdev\u002Fnull | openssl x509 -noout -dates\n\n# 7. Cache status\ncurl -sI https:\u002F\u002F${DOMAIN} | grep -iE \"x-cache-status|cf-cache-status\"\n```\n\nOutput a summary report:\n\n```\nAll 3 containers running (WordPress + MySQL + Nginx)\nHTTPS certificate valid, expires: YYYY-MM-DD\nWordPress 6.7, X active plugins installed\n6 base pages created + navigation menu\nMultilingual configured with X languages\nSEO (Rank Math) enabled\nTriple-layer cache active\nDatabase auto-backup configured\nxmlrpc.php blocked\nFile permissions hardened\nGEO: robots.txt has AI bot tiers, llms.txt serving, JSON-LD schemas active\n\nSite URL:  https:\u002F\u002F${DOMAIN}\nAdmin URL: https:\u002F\u002F${DOMAIN}\u002Fwp-admin\nEmail:     ${EMAIL}\nWhatsApp:  ${WHATSAPP}\n```\n\n---\n\n## Troubleshooting\n\n**Docker containers fail to start:** Check `docker compose logs \u003Cservice>`. Common issues: port already in use (`lsof -i :80`), insufficient disk space (`df -h`).\n\n**SSL certificate acquisition fails:** Confirm DNS has propagated (`dig ${DOMAIN}`), port 80 is accessible. Let's Encrypt limits to 5 certificates per domain per week.\n\n**WordPress setup wizard doesn't appear:** Check `docker compose logs wordpress`. If database connection fails, check if .env passwords contain special characters (need escaping).\n\n**Plugin installation fails:** When WP-CLI fails, install manually from the admin panel (Plugins → Add New). Ensure the WordPress container can reach wordpress.org.\n\n**Low PageSpeed score:** Confirm all three cache layers are active, Imagify has optimized existing images, Jetpack Boost Critical CSS has been generated. Clear all caches and retest.\n\n**SSH connection drops:** Use `screen` or `tmux` for long-running commands. Reconnect with `screen -r` to resume session.\n",{"name":5,"description":7},"master","4aa004da461d820f4ea5499e58eb8d196cf99016","community\u002Fclawhub\u002Fw\u002Fwordpress-trade-site",0,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge","https:\u002F\u002Fskill-explorer-rho.vercel.app","https:\u002F\u002Fgithub.com\u002FLord1Egypt","Unbreakable. Unstoppable. Unmatched⚡.\r\n Speaker of machine tongues 🤖  | World-builder of decentralized dreams 🌐 | Defender of the digital realm🛡️.","2026-06-10 08:21:01",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add Lord1Egypt\u002Fawesome-skill-forge --skill wordpress-trade-site",{"tool":39,"command":40},"bunx","bunx skills add Lord1Egypt\u002Fawesome-skill-forge --skill wordpress-trade-site",{"tool":42,"command":43},"pnpm","pnpm dlx skills add Lord1Egypt\u002Fawesome-skill-forge --skill wordpress-trade-site","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fclawhub\u002Fw\u002Fwordpress-trade-site\u002FSKILL.md",true,[],[48,55,62,69,76,83],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M785WKJB99G3STR1NF9NRTJW","youtube-content","YouTube transcripts to summaries, threads, blogs.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fyoutube-content\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M785WEFHB0G2S9YA6EPR3H0E","xurl","X\u002FTwitter via xurl CLI: post, search, DM, media, v2 API.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fxurl\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M785W98EDN4EFJXJPMQEHCRC","touchdesigner-mcp","Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals. 36 native tools.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftouchdesigner-mcp\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M785W5S9FP3QBH2V191E025P","test-driven-development","TDD: enforce RED-GREEN-REFACTOR, tests before code.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftest-driven-development\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M785W2AS08NSSH9YATCV6FJB","teams-meeting-pipeline","Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fteams-meeting-pipeline\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M785VXKW4T34BTP1SCHW1R7F","systematic-debugging","4-phase root cause debugging: understand bugs before fixing.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fsystematic-debugging\u002FSKILL.md",[],[]]