StageGuard 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.
- Displays a prominent message in the admin panel and on the frontend indicating a staging environment - only if WooCommerce is not installed
- Automatically deactivates specific plugins.
- Prevents activation of certain plugins and provides a custom error message.
- Activates Coming Soon mode for WooCommerce (if installed).
- Modifies search engine visibility settings.
- Provides password protection for the staging site.
- Offers IP restriction capabilities.
- Modifies robots.txt to discourage search engine indexing.
- Catches and logs emails sent from the staging environment.
- Includes WP-CLI commands for managing the plugin.
StageGuard will deactivate the following plugins:
- BunnyCDN
- Redis Cache
- Google Listings and Ads
- Metorik Helper
- Order Sync with Zendesk for WooCommerce
- Redis Object Cache
- RunCloud Hub
- Site Kit by Google
- Super Page Cache for Cloudflare
- WooCommerce - ShipStation Integration
- WP OPcache
- Headers Security Advanced & HSTS WP
- WP-Rocket
- Tidio Chat
- LiteSpeed Cache
- WP Fastest Cache
- PhastPress
- W3 Total Cache
- WP Optimize
- Autoptimize
- NitroPack
- WP Sync DB
- WP Sync DB Media Files
- UpdraftPlus
- Mailchimp for WooCommerce
- Upload the
stageguard
folder to the/wp-content/plugins/
directory. - Activate the plugin through the 'Plugins' menu in WordPress.
- Go to Settings > StageGuard to configure the plugin.
- Debug Mode: Toggle WordPress debug mode on or off.
- Password Protection: Enable to redirect non-logged-in users to the WordPress login page.
- IP Restriction: Enable and specify allowed IP addresses to restrict access to the staging site.
- Allowed IPs: Enter the IP addresses that should have access to the staging site (one per line).
You can view the StageGuard logs in two ways:
- Admin Interface: Go to Settings > StageGuard Logs in the WordPress admin area.
- WP-CLI: Use the command
wp stageguard show_log
to view logs in the terminal.
StageGuard supports the following WP-CLI commands:
wp stageguard debug_mode <on|off>
: Toggle debug mode on or off.wp stageguard show_log [--lines=<number>]
: Display the StageGuard log. Use the--lines
option to specify the number of lines to show (default is 50).
If you're having issues with StageGuard, check the following:
- Ensure that the web server has write permissions to the
wp-content
directory for logging. - If you're not seeing the staging indicator, check if your theme is properly loading the
wp_head
action. - If password protection isn't working, make sure you're not already logged in to WordPress.
This plugin is licensed under the GPL-2.0 License.
For support, please open an issue on the GitHub repository.
Gabriel Kanev Author URI: https://gkanev.com