From 20714862d7fd970ad031f9b65b1d1a97007b459d Mon Sep 17 00:00:00 2001 From: Usman Nasir Date: Fri, 19 Mar 2021 23:53:10 +0500 Subject: [PATCH] bug fix: cater for custom path of wp-content --- websiteFunctions/StagingSetup.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/websiteFunctions/StagingSetup.py b/websiteFunctions/StagingSetup.py index 7e6346d40..35d62fdac 100644 --- a/websiteFunctions/StagingSetup.py +++ b/websiteFunctions/StagingSetup.py @@ -119,7 +119,10 @@ class StagingSetup(multi.Thread): ## Sync WP-Content Folder - command = 'rsync -avz %s/wp-content/ %s/wp-content/' % (masterPath, path) + command = 'wp theme path --allow-root --path=%s' % (masterPath) + WpContentPath = ProcessUtilities.outputExecutioner(command).splitlines()[-1].replace('themes', '') + + command = 'rsync -avz %s %s/wp-content/' % (WpContentPath, path) ProcessUtilities.executioner(command) ## Search and replace url @@ -200,7 +203,10 @@ class StagingSetup(multi.Thread): logging.statusWriter(tempStatusPath, 'Syncing data..,50') - command = 'rsync -avz %s/wp-content/ %s/wp-content/' % (child.path, masterPath) + command = 'wp theme path --allow-root --path=%s' % (masterPath) + WpContentPath = ProcessUtilities.outputExecutioner(command).splitlines()[-1].replace('themes', '') + + command = 'rsync -avz %s/wp-content/ %s' % (child.path, WpContentPath) ProcessUtilities.executioner(command) ## Search and replace url