Arvil Meña
Home / Snippets / WP UpdraftPlus – disable plugin on local

WP UpdraftPlus – disable plugin on local

by Arvil
published => November 25th 2020
# wp-config.php
define( 'WP_ENVIRONMENT_TYPE', 'staging' );

# in a mu-plugin
add_filter(
	'updraftplus_boot_backup',
	function( $go_ahead ) {
		return ( 'local' === wp_get_environment_type() );
	}
);

Related Links

  • https://make.wordpress.org/core/2020/07/24/new-wp_get_environment_type-function-in-wordpress-5-5/
  • https://updraftplus.com/faqs/how-can-i-configure-a-site-to-never-back-up/

Share

Related Posts

Comments