mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-06 21:35:55 +01:00
bug fix: create wp staging
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#!/usr/local/CyberCP/bin/python
|
||||
import subprocess
|
||||
import threading as multi
|
||||
from plogical.CyberCPLogFileWriter import CyberCPLogFileWriter as logging
|
||||
from plogical.virtualHostUtilities import virtualHostUtilities
|
||||
@@ -51,6 +52,21 @@ class StagingSetup(multi.Thread):
|
||||
masterPath = '/home/%s/public_html' % (masterDomain)
|
||||
replaceDomain = masterDomain
|
||||
|
||||
### Check WP CLI
|
||||
|
||||
try:
|
||||
command = 'wp --info'
|
||||
outout = ProcessUtilities.outputExecutioner(command)
|
||||
|
||||
if not outout.find('WP-CLI root dir:') > -1:
|
||||
from plogical.applicationInstaller import ApplicationInstaller
|
||||
ai = ApplicationInstaller(None, None)
|
||||
ai.installWPCLI()
|
||||
except subprocess.CalledProcessError:
|
||||
from plogical.applicationInstaller import ApplicationInstaller
|
||||
ai = ApplicationInstaller(None, None)
|
||||
ai.installWPCLI()
|
||||
|
||||
configPath = '%s/wp-config.php' % (masterPath)
|
||||
|
||||
## Check if WP Detected on Main Site
|
||||
|
||||
Reference in New Issue
Block a user