From e640bb49506e09278a30059bfae2cc09448d26b7 Mon Sep 17 00:00:00 2001 From: Rahul Date: Mon, 4 Jan 2016 15:56:53 +0530 Subject: [PATCH] When I tried hosting a WP site on GoDaddy with Plesk, it asked for permissions on C:\Windows\Temp folder. Since it was not accessible, I made this change to ensure it has permissions on a folder that I have control on. Currently it is set to root/database. It will more sense to have a configuration option. But till then, it should suffice. --- wp-db-backup.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-db-backup.php b/wp-db-backup.php index 7e99916..4649e33 100755 --- a/wp-db-backup.php +++ b/wp-db-backup.php @@ -109,7 +109,8 @@ function wpdbBackup() { } } - $this->backup_dir = trailingslashit(apply_filters('wp_db_b_backup_dir', (isset($_GET['wp_db_temp_dir']) && is_writable($_GET['wp_db_temp_dir'])) ? $_GET['wp_db_temp_dir'] : get_temp_dir())); + //$this->backup_dir = trailingslashit(apply_filters('wp_db_b_backup_dir', (isset($_GET['wp_db_temp_dir']) && is_writable($_GET['wp_db_temp_dir'])) ? $_GET['wp_db_temp_dir'] : get_temp_dir())); + $this->backup_dir = trailingslashit(apply_filters('wp_db_b_backup_dir', (isset($_GET['wp_db_temp_dir']) && is_writable($_GET['wp_db_temp_dir'])) ? $_GET['wp_db_temp_dir'] : getcwd().'/../database')); $this->basename = 'wp-db-backup'; $this->referer_check_key = $this->basename . '-download_' . DB_NAME;