Skip to content

Commit af182ad

Browse files
committed
WP Staging: Exclude some folders
1 parent d6a9e15 commit af182ad

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

plogical/upgrade.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1262,7 +1262,7 @@ def downloadAndUpgrade(versionNumbring):
12621262
for items in data:
12631263
if items.find("CommonMiddleware") > -1:
12641264
if csrfCheck == 1:
1265-
writeToFile.writelines(" 'django.middleware.common.CommonMiddleware',\n")
1265+
writeToFile.writelines(" 'django.middleware.csrf.CsrfViewMiddleware',\n")
12661266

12671267
if items.find("'filemanager',") > -1:
12681268
writeToFile.writelines(items)

websiteFunctions/StagingSetup.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from random import randint
1010
import os
1111

12+
1213
class StagingSetup(multi.Thread):
1314

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

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

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

67-
command = 'rsync -avzh --exclude "%s" --exclude "wp-content/plugins/litespeed-cache" %s/ %s' % (domain, masterPath, path)
68+
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' % (
69+
domain, masterPath, path)
6870
ProcessUtilities.executioner(command, website.externalApp)
6971

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

0 commit comments

Comments
 (0)