Repository navigation
Adding Sites
Varun Dubey edited this page Sep 13, 2026
·
2 revisions
Each WordPress server needs:
- SSH access (password or key-based)
- WP-CLI installed and in PATH
- WordPress 5.0+
Best for production servers and hosting companies with centralized key management.
wp_add_site(
name="client-blog",
host="server1.example.com",
username="deploy",
wp_path="/var/www/html",
auth_type="key",
key_path="~/.ssh/id_ed25519",
site_url="https://client-blog.com"
)No password needed for subsequent commands:
wp_full_scan("client-blog")Common for InstaWP, managed hosting, or quick testing. Password is passed at runtime and never stored on disk.
wp_add_site(
name="staging-site",
host="147.182.198.163",
username="sshuser",
wp_path="/home/sshuser/web/example.com",
auth_type="password",
site_url="https://staging.example.com"
)Every command requires the password parameter:
wp_full_scan("staging-site", password="your-ssh-password")wp_add_site(
name="custom-port-site",
host="server2.example.com",
port=2222,
username="admin",
wp_path="/home/admin/public_html",
auth_type="key",
key_path="~/.ssh/server2_key"
)Always test after adding:
wp_test_connection("client-blog")This verifies:
- SSH connection works
- WP-CLI is available and functional
- WordPress path is correct
- WordPress is installed and responsive
# List all sites with status
wp_list_sites()
# Get detailed info for one site
wp_get_site("client-blog")
# Update configuration (e.g., changed SSH key path)
wp_update_site("client-blog", key_path="~/.ssh/new_key")
# Remove a site
wp_remove_site("old-client")If you manage 50+ sites, you can script the addition:
# In Claude Code, just describe your sites:
"Add these 10 sites - all use key auth with ~/.ssh/hosting_key,
username 'deploy', wp_path pattern /var/www/{domain}/htdocs:
site1.com, site2.com, site3.com..."Claude will call wp_add_site() for each one and test connections.
Site configurations are stored in ~/.wp-malware-cleanup/sites.json. This file contains hostnames, usernames, and paths - but never passwords.
Back up this file to avoid re-adding sites:
cp ~/.wp-malware-cleanup/sites.json ~/backup/Getting Started
Running as a Service
Threat Intelligence
Reference
Project
- GitHub Repo
- WP Vanguard (threat research)
- Wbcom Designs
- License: GPL-2.0-or-later