From 22b22fcfa77c870ff8f308a01cff77077dc82581 Mon Sep 17 00:00:00 2001 From: Johannes Kees Date: Tue, 15 May 2018 10:58:18 +0200 Subject: [PATCH 1/2] added kill switch via constant --- functions/core.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/functions/core.php b/functions/core.php index ab94bdf7..83757615 100755 --- a/functions/core.php +++ b/functions/core.php @@ -422,6 +422,14 @@ function has_server_permissions() { */ function is_backup_possible() { + /** + * Kill switch to disable backups with constant `HMBKP_DISABLE` set to true. + * For example in local or development environments. + */ + if (defined(HMBKP_DISABLE) && HMBKP_DISABLE === true){ + return false; + } + if ( ! has_server_permissions() || ! is_dir( Path::get_path() ) ) { return false; } From 75af4e62f6f33f57950012f06c4dbc69aea16248 Mon Sep 17 00:00:00 2001 From: Johannes Kees Date: Tue, 15 May 2018 11:02:42 +0200 Subject: [PATCH 2/2] added added doc to killswitch --- readme.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/readme.txt b/readme.txt index 50d71032..39e371ee 100644 --- a/readme.txt +++ b/readme.txt @@ -102,6 +102,10 @@ The script to be entered into the Heart Internet cPanel is: `/usr/bin/php5 /home If your backups are failing, it's commonly caused by a lack of available resources on your server. To establish this is the case, exclude the complete (or parts of the) uploads folder and run a backup. If that succeeds, you know it's probably a server issue. If it does not succeed, report the results to our support team for further help. You can contact support by enabling support from your Admin Dashboard (recommended), or emailing backupwordpress@hmn.md +**Disable backup in local or development environments** + +To disable backups add "define('HMBKP_DISABLE', true);" to your wp-config.php. + **Further Support & Feedback** General support questions should be posted in the WordPress support forums, tagged with backupwordpress.