Plugin info

Total downloads: 1,970
Active installs: 20
Total reviews: 1
Average rating: 5
Support threads opened: 0
Support threads resolved: 0 (0%)
Available in: 1 language(s)
Contributors: 2
Last updated: 3/23/2019 (2475 days ago)
Added to WordPress: 2/9/2019 (6 years old)
Minimum WordPress version: 4.7
Tested up to WordPress version: 5.1.21
Minimum PHP version: 7.0

Maintenance & Compatibility

Maintenance score

Possibly abandoned • Last updated 2475 days ago • 1 reviews

22/100

Is Safe Staging abandoned?

Possibly abandoned (last update 2475 days ago).

Compatibility

Requires WordPress: 4.7
Tested up to: 5.1.21
Requires PHP: 7.0

Similar & Alternatives

Explore plugins with similar tags, and compare key metrics like downloads, ratings, updates, support, and WP/PHP compatibility.

Local Email Blocker
Rating 0.0/5 (0 reviews)Active installs 0
Migration, Backup, Staging – WPvivid Backup & Migration
Rating 4.9/5 (1,365 reviews)Active installs 800,000
Backup Migration
Rating 4.9/5 (1,269 reviews)Active installs 100,000
BlogVault Backup & Staging
Rating 4.5/5 (317 reviews)Active installs 80,000
InstaWP Connect – 1-click WP Staging & Migration
Rating 4.5/5 (11 reviews)Active installs 40,000
Backup and Staging by WP Time Capsule
Rating 4.1/5 (125 reviews)Active installs 20,000

Description

Simply define your production url in settings and copy your site to your staging instance without fear. The staging site won’t send any emails and won’t process any payments.

Why should I use the plugin

If you host your site on a managed host that provides a staging instance (WP Engine, Siteground, and others), or if you run a staging instance for a self-hosted website, you may have found that WordPress and WooCommerce will automatically send emails and process payments from the staging site. Whenever you clone your production site to your staging site, you would normally need to complete a number of steps to make your site “safe for staging.”

Instead, install this plugin in production, set the production URL, and safely copy your site to and from staging. No other steps needed!

Features on Staging

  1. A “noindex” tag is added to all pages. Your staging site won’t show up in Google.
  2. WordPress emails are stopped. The site won’t send any emails except for the password reset email. Please note, this feature may not be compatible with plugins that offload email to a 3rd party service.
  3. The WooCommerce checkout page has a warning message notifying the visitor they are viewing the staging site.
  4. WooCommerce payment gateways are suspended. Bank account transfer, Cash on Delivery and Check are left enabled. Stripe is automatically put into test mode.
  5. WooCommerce Subscriptions is put into staging mode.

Installation

  1. Upload the plugin to /wp-content/plugins/
  2. Activate the plugin at /wp-admin/plugins.php
  3. Set the URL for your production site at /wp-admin/options-general.php?page=safe-staging

Frequently Asked Questions

Can I complicate how the plugin determines what the production URL is?

The filter safe_staging_is_production will let you change what the plugin sees as the production site.
For example, the filter below will let you support an alternative production URL.

/**
 * Change whether Safe Staging thinks the current site
 * is the production site.
 *
 * @param bool $is_prod Is this the production site.
 * @return bool         Whether we should treat this as an alternative production site.
 */
add_filter(
    'safe_staging_is_production',
    function( $is_prod ) {
        $alternative_prod_url = 'https://myothersite.com';

        if ( site_url() === $alternative_prod_url ) {
            $is_prod = true;
        }

        return $is_prod;
    }
);

Can I let other emails get sent on staging sites?

The filter safe_staging_is_whitelist_email will let you intervene just before an email is blocked.
For example, the filter below will let you support an alternative production URL.

/**
 * Determine whether a particular email should be sent.
 *
 * In this case we test if the to recipient is our admin address.
 *
 * @param bool   $whitelisted Should the email actually send.
 * @param object $this        Instance of the Fake PHPMailer class.
 * @return bool               Whitelist value tested against the recipient.
 */
add_filter(
    'safe_staging_is_whitelist_email'
    function( $whitelisted, $phpmailer ) {
        if ( '[email protected]' === $phpmailer->getToAddresses() ) {
            $whitelisted = true;
        }

        return $whitelisted;
    },
    10,
    2
);

Can I change the message that shows on the checkout page?

The filter safe_staging_checkout_notice will let you override the message shown on the cart and checkout pages.

/**
 * Change the warning message that gets displayed on the checkout page
 * of staging sites.
 *
 * @return string New message to show on the checkout page.
 */
add_filter(
    'safe_staging_checkout_notice',
    function() {
        return 'You\'ve found our staging site! You might want to go back to the production site.';
    }
)

Review feed

Cousett
2/9/2019

This saved my client

My client did something that suddenly started sending emails from the staging server for their membership site. This plugin allowed me to kill the emails from sending and backtrack the issues caused before it got out of hand.

Screenshots

No screenshots available

Changelog

0.3.2

  • Improves CI / CD
  • Adds wpunit tests

0.3

  • Improve admin notifications
  • Clarifies readme code examples
  • Adds wpunit tests

0.2.3

  • Adds support for CI / CD code management

0.2.1

  • Bumps compatibility to 5.1.
  • Adds uninstall file.

0.2

  • Adds noindex tag to the staging site.