bug fix: staging site issue
This commit is contained in:
parent
503c464e48
commit
4408ca04c8
|
|
@ -160,9 +160,10 @@ class WebsiteManager:
|
||||||
# This is a staging site - perform complete cleanup
|
# This is a staging site - perform complete cleanup
|
||||||
staging_website = WPDelete.owner
|
staging_website = WPDelete.owner
|
||||||
|
|
||||||
# Delete virtual host configurations before deleting records
|
# Use the same robust deletion method as regular websites
|
||||||
from plogical.vhost import vhost
|
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||||
vhost.deleteVirtualHostConfigurations(staging_website.domain)
|
execPath = execPath + " deleteVirtualHostConfigurations --virtualHostName " + staging_website.domain
|
||||||
|
ProcessUtilities.popenExecutioner(execPath)
|
||||||
|
|
||||||
# Delete all staging records
|
# Delete all staging records
|
||||||
staging_records.delete() # Delete WPStaging records
|
staging_records.delete() # Delete WPStaging records
|
||||||
|
|
@ -239,8 +240,10 @@ class WebsiteManager:
|
||||||
staging_website = staging_wpsite.owner
|
staging_website = staging_wpsite.owner
|
||||||
|
|
||||||
# Delete the staging Websites record and all associated data BEFORE deleting DB records
|
# Delete the staging Websites record and all associated data BEFORE deleting DB records
|
||||||
from plogical.vhost import vhost
|
# Use the same robust deletion method as regular websites
|
||||||
vhost.deleteVirtualHostConfigurations(staging_website.domain)
|
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||||
|
execPath = execPath + " deleteVirtualHostConfigurations --virtualHostName " + staging_website.domain
|
||||||
|
ProcessUtilities.popenExecutioner(execPath)
|
||||||
|
|
||||||
# Delete the WPStaging record
|
# Delete the WPStaging record
|
||||||
wstagingDelete.delete()
|
wstagingDelete.delete()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue