Skip to content
Permalink
Browse files

WP Staging: Exclude some folders

  • Loading branch information...
usmannasir committed Aug 25, 2019
1 parent d6a9e15 commit af182adc9a737a4f03352399a19a8adf433c9ed6
Showing with 6 additions and 4 deletions.
  1. +1 −1 plogical/upgrade.py
  2. +5 −3 websiteFunctions/StagingSetup.py
@@ -1262,7 +1262,7 @@ def downloadAndUpgrade(versionNumbring):
for items in data:
if items.find("CommonMiddleware") > -1:
if csrfCheck == 1:
writeToFile.writelines(" 'django.middleware.common.CommonMiddleware',\n")
writeToFile.writelines(" 'django.middleware.csrf.CsrfViewMiddleware',\n")

if items.find("'filemanager',") > -1:
writeToFile.writelines(items)
@@ -9,6 +9,7 @@
from random import randint
import os


class StagingSetup(multi.Thread):

def __init__(self, function, extraArgs):
@@ -23,7 +24,7 @@ def run(self):
elif self.function == 'startSyncing':
self.startSyncing()
except BaseException, msg:
logging.writeToFile( str(msg) + ' [StagingSetup.run]')
logging.writeToFile(str(msg) + ' [StagingSetup.run]')

def startCloning(self):
try:
@@ -64,7 +65,8 @@ def startCloning(self):

masterPath = '/home/%s/public_html' % (masterDomain)

command = 'rsync -avzh --exclude "%s" --exclude "wp-content/plugins/litespeed-cache" %s/ %s' % (domain, masterPath, path)
command = 'rsync -avzh --exclude "%s" --exclude "wp-content/backups" --exclude "wp-content/updraft" --exclude "wp-content/cache" --exclude "wp-content/plugins/litespeed-cache" %s/ %s' % (
domain, masterPath, path)
ProcessUtilities.executioner(command, website.externalApp)

logging.statusWriter(tempStatusPath, 'Data copied..,50')
@@ -226,4 +228,4 @@ def startSyncing(self):
return 0
except BaseException, msg:
mesg = '%s. [404]' % (str(msg))
logging.statusWriter(tempStatusPath, mesg)
logging.statusWriter(tempStatusPath, mesg)

0 comments on commit af182ad

Please sign in to comment.
You can’t perform that action at this time.