{"id":20899492,"url":"https://github.com/open-wp-club/stageguard","last_synced_at":"2026-05-18T15:04:37.786Z","repository":{"id":248832623,"uuid":"829909707","full_name":"Open-WP-Club/StageGuard","owner":"Open-WP-Club","description":"A WordPress plugin designed to clearly indicate that a website is running in a staging environment with a few extensions","archived":false,"fork":false,"pushed_at":"2024-10-23T12:32:49.000Z","size":64,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-06T03:53:49.445Z","etag":null,"topics":["automatic-control","staging","wordpress","wordpress-plugin"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Open-WP-Club.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-17T08:29:30.000Z","updated_at":"2024-10-23T12:32:38.000Z","dependencies_parsed_at":"2024-08-22T15:17:36.688Z","dependency_job_id":"bc30f38a-4d9d-4dc0-b33d-a56dd84f2136","html_url":"https://github.com/Open-WP-Club/StageGuard","commit_stats":null,"previous_names":["mrgkanev/stageguard","open-wp-club/stageguard"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Open-WP-Club%2FStageGuard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Open-WP-Club%2FStageGuard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Open-WP-Club%2FStageGuard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Open-WP-Club%2FStageGuard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Open-WP-Club","download_url":"https://codeload.github.com/Open-WP-Club/StageGuard/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243285624,"owners_count":20266849,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automatic-control","staging","wordpress","wordpress-plugin"],"created_at":"2024-11-18T11:14:13.327Z","updated_at":"2026-05-18T15:04:37.780Z","avatar_url":"https://github.com/Open-WP-Club.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# StageGuard\n\n## Description\n\nStageGuard is a WordPress plugin designed to clearly indicate and manage a staging environment. It provides various features to protect your staging site, prevent accidental emails, and manage plugin activations.\n\n## Features\n\n- Displays a prominent message in the admin panel and on the frontend indicating a staging environment - only if WooCommerce is not installed\n- Automatically deactivates specific plugins on staging environments\n- Prevents activation of certain plugins and provides a custom error message\n- Activates Coming Soon mode for WooCommerce (if installed)\n- Modifies search engine visibility settings\n- Provides password protection for the staging site (redirects to WordPress login)\n- **Advanced IP restriction with multiple formats:**\n  - Individual IP addresses (e.g., `192.168.1.1`)\n  - CIDR notation for IP ranges (e.g., `192.168.1.0/24`)\n  - IP address ranges (e.g., `192.168.1.1-192.168.1.10`)\n  - Supports both IPv4 and IPv6\n  - Automatic localhost whitelisting for safety\n  - Smart proxy header detection (X-Forwarded-For, X-Real-IP)\n- Filters robots.txt to discourage search engine indexing (no physical file modification)\n- Catches and logs emails sent from the staging environment\n- Includes WP-CLI commands for managing the plugin\n- Clean, modular architecture with separated concerns\n\n## Deactivated Plugins\n\nStageGuard will deactivate the following plugins:\n\n1. [BunnyCDN](https://wordpress.org/plugins/bunnycdn/)\n2. [Redis Cache](https://wordpress.org/plugins/redis-cache/)\n3. [Google Listings and Ads](https://wordpress.org/plugins/google-listings-and-ads/)\n4. [Metorik Helper](https://wordpress.org/plugins/metorik-helper/)\n5. [Order Sync with Zendesk for WooCommerce](https://wordpress.org/plugins/order-sync-with-zendesk-for-woocommerce/)\n6. [Redis Object Cache](https://wordpress.org/plugins/redis-object-cache/)\n7. [RunCloud Hub](https://wordpress.org/plugins/runcloud-hub/)\n8. [Site Kit by Google](https://wordpress.org/plugins/google-site-kit/)\n9. [Super Page Cache for Cloudflare](https://wordpress.org/plugins/wp-cloudflare-page-cache/)\n10. [WooCommerce - ShipStation Integration](https://wordpress.org/plugins/woocommerce-shipstation-integration/)\n11. [WP OPcache](https://wordpress.org/plugins/wp-opcache/)\n12. [Headers Security Advanced \u0026 HSTS WP](https://wordpress.org/plugins/headers-security-advanced-hsts-wp/)\n13. [WP-Rocket](https://wp-rocket.me/)\n14. [Tidio Chat](https://wordpress.org/plugins/tidio-live-chat/)\n15. [LiteSpeed Cache](https://wordpress.org/plugins/litespeed-cache/)\n16. [WP Fastest Cache](https://wordpress.org/plugins/wp-fastest-cache/)\n17. [PhastPress](https://wordpress.org/plugins/phastpress/)\n18. [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/)\n19. [WP Optimize](https://wordpress.org/plugins/wp-optimize/)\n20. [Autoptimize](https://wordpress.org/plugins/autoptimize/)\n21. [NitroPack](https://wordpress.org/plugins/nitropack/)\n22. [WP Sync DB](https://github.com/wp-sync-db/wp-sync-db)\n23. [WP Sync DB Media Files](https://github.com/wp-sync-db/wp-sync-db-media-files)\n24. [UpdraftPlus](https://wordpress.org/plugins/updraftplus/)\n25. [Mailchimp for WooCommerce](https://wordpress.org/plugins/mailchimp-for-woocommerce/)\n\n## Installation\n\n1. Upload the `stageguard` folder to the `/wp-content/plugins/` directory.\n2. Activate the plugin through the 'Plugins' menu in WordPress.\n3. Go to Settings \u003e StageGuard to configure the plugin.\n\n## Configuration\n\nNavigate to **Settings \u003e StageGuard** in your WordPress admin panel to configure:\n\n### 1. Debug Mode\nToggle WordPress debug mode on or off. When enabled, WP_DEBUG constant will be set to true in wp-config.php.\n\n### 2. Password Protection\nEnable to redirect non-logged-in users to the WordPress login page. This ensures only authenticated users can access the staging site.\n\n### 3. IP Restriction\nEnable IP-based access control to restrict who can view the staging site.\n\n### 4. Allowed IPs\nSpecify IP addresses that should have access to the staging site. Supports multiple formats:\n\n- **Individual IPs**: `192.168.1.1` (one per line)\n- **CIDR Notation**: `192.168.1.0/24` (allows entire subnet)\n- **IP Ranges**: `192.168.1.1-192.168.1.10` (allows range of IPs)\n- **IPv6 Support**: `2001:db8::1` or `2001:db8::/32`\n\nThe system automatically whitelists `127.0.0.1` and `::1` (localhost) for safety. Your current IP address is displayed in the settings page for convenience.\n\n## Viewing Logs\n\nYou can view the StageGuard logs in two ways:\n\n1. **Admin Interface**: Go to Settings \u003e StageGuard Logs in the WordPress admin area.\n2. **WP-CLI**: Use the command `wp stageguard show_log` to view logs in the terminal.\n\n## WP-CLI Commands\n\nStageGuard supports the following WP-CLI commands:\n\n- `wp stageguard debug_mode \u003con|off\u003e`: Toggle debug mode on or off.\n- `wp stageguard show_log [--lines=\u003cnumber\u003e]`: Display the StageGuard log. Use the `--lines` option to specify the number of lines to show (default is 50).\n- `wp stageguard status`: Shows current status.\n- `wp stageguard password_protection`: Toggle password protection on or off.\n- `wp stageguard ip_restriction`: Toggle IP restrictions on or off.\n- `wp stageguard show_log --clear`: Clearing logs.\n\n## Troubleshooting\n\nIf you're having issues with StageGuard, check the following:\n\n1. **Logging Issues**: Ensure that the web server has write permissions to the `wp-content` directory for logging.\n2. **Staging Indicator Not Showing**: Check if your theme is properly loading the `wp_head` action.\n3. **Password Protection Not Working**: Make sure you're not already logged in to WordPress. The protection only affects non-authenticated users.\n4. **IP Restriction Issues**:\n   - Verify your IP format is correct (use the formats shown in Configuration section)\n   - Check if you're behind a proxy - the plugin detects `X-Forwarded-For` headers\n   - Remember that `127.0.0.1` and `::1` are always whitelisted\n5. **robots.txt Not Updating**: The plugin uses WordPress's virtual robots.txt. If you have a physical `robots.txt` file, it will take precedence. Delete the physical file to use the plugin's filter.\n\n## Requirements\n\n- **WordPress**: 6.4 or higher\n- **PHP**: 8.0 or higher\n- **License**: GPL-2.0-or-later\n\n## Support\n\nFor support, please open an issue on the [GitHub repository](https://github.com/Open-WP-Club/StageGuard/).\n\n## Contributing\n\nWe welcome contributions! Please feel free to submit pull requests or open issues for bugs and feature requests.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopen-wp-club%2Fstageguard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopen-wp-club%2Fstageguard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopen-wp-club%2Fstageguard/lists"}