Skip to content

A WordPress plugin designed to clearly indicate that a website is running in a staging environment with a few extensions

License

Notifications You must be signed in to change notification settings

Open-WP-Club/StageGuard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 

Repository files navigation

StageGuard

Description

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.

Features

  • 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.

Deactivated Plugins

StageGuard will deactivate the following plugins:

  1. BunnyCDN
  2. Redis Cache
  3. Google Listings and Ads
  4. Metorik Helper
  5. Order Sync with Zendesk for WooCommerce
  6. Redis Object Cache
  7. RunCloud Hub
  8. Site Kit by Google
  9. Super Page Cache for Cloudflare
  10. WooCommerce - ShipStation Integration
  11. WP OPcache
  12. Headers Security Advanced & HSTS WP
  13. WP-Rocket
  14. Tidio Chat
  15. LiteSpeed Cache
  16. WP Fastest Cache
  17. PhastPress
  18. W3 Total Cache
  19. WP Optimize
  20. Autoptimize
  21. NitroPack
  22. WP Sync DB
  23. WP Sync DB Media Files
  24. UpdraftPlus
  25. Mailchimp for WooCommerce

Installation

  1. Upload the stageguard folder to the /wp-content/plugins/ directory.
  2. Activate the plugin through the 'Plugins' menu in WordPress.
  3. Go to Settings > StageGuard to configure the plugin.

Configuration

  1. Debug Mode: Toggle WordPress debug mode on or off.
  2. Password Protection: Enable to redirect non-logged-in users to the WordPress login page.
  3. IP Restriction: Enable and specify allowed IP addresses to restrict access to the staging site.
  4. Allowed IPs: Enter the IP addresses that should have access to the staging site (one per line).

Viewing Logs

You can view the StageGuard logs in two ways:

  1. Admin Interface: Go to Settings > StageGuard Logs in the WordPress admin area.
  2. WP-CLI: Use the command wp stageguard show_log to view logs in the terminal.

WP-CLI Commands

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).

Troubleshooting

If you're having issues with StageGuard, check the following:

  1. Ensure that the web server has write permissions to the wp-content directory for logging.
  2. If you're not seeing the staging indicator, check if your theme is properly loading the wp_head action.
  3. If password protection isn't working, make sure you're not already logged in to WordPress.

License

This plugin is licensed under the GPL-2.0 License.

Support

For support, please open an issue on the GitHub repository.

Author

Gabriel Kanev Author URI: https://gkanev.com

About

A WordPress plugin designed to clearly indicate that a website is running in a staging environment with a few extensions

Topics

Resources

License

Stars

Watchers

Forks

Languages