Last active
November 23, 2020 18:39
-
-
Save corradomatt/8941712 to your computer and use it in GitHub Desktop.
The settings for Migrate-DB-Pro plugin to exclude Better WordPress Security, WooCommerce SSL and WooCommerce Plugin Activation settings when pushing or pulling your database. This code DOES NOT work as a stand-alone gist. You will need to utilize it within this code - https://github.com/deliciousbrains/wp-migrate-db-pro-tweaks/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Exclude certain WordPress database settings from being migrated when pushing or pulling | |
* with Migrate-DB-Pro | |
* | |
* Useful when developing locally and wanting to push or pull database settings between envirnments | |
* USE CAUTION! - Must be used with https://github.com/deliciousbrains/wp-migrate-db-pro-tweaks/ | |
*/ | |
function preserved_options( $options ) { | |
$options[] = 'blog_public'; // discourage search engines setting | |
$options[] = 'bit51_bwps'; // Better WordPress Security Settings | |
$options[] = 'bit51_bwps_data'; // Better WordPress Security Data (not sure if this is necessary) | |
$options[] = 'woocommerce_force_ssl_checkout'; // Using SSL within WooCommerce | |
$options[] = 'woocommerce_unforce_ssl_checkout'; // Unforcing SSL within WooCommerce | |
$options[] = 'woothemes-updater-activated'; // WooCommerce Plugin Activation Codes | |
return $options; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
no need for the extra plugin/code.... just add the function into the correct filter,
wpmdb_preserved_options