mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-06 21:35:55 +01:00
wp manager error fixed
This commit is contained in:
@@ -1963,6 +1963,17 @@ $parameters = array(
|
||||
|
||||
wpobj = WPSites.objects.get(pk=self.data['WPid'])
|
||||
|
||||
|
||||
|
||||
#get wp version
|
||||
path_to_wordpress = wpobj.path
|
||||
command = f"wp --path='{path_to_wordpress}' core version --skip-plugins --skip-themes"
|
||||
Wp_version = ProcessUtilities.outputExecutioner(command, wpobj.owner.externalApp)
|
||||
old_wp_version = Wp_version.rstrip('\n')
|
||||
logging.writeToFile("Old site wp version:%s"% old_wp_version)
|
||||
|
||||
|
||||
|
||||
### Create secure folder
|
||||
ACLManager.CreateSecureDir()
|
||||
tempPath = '%s/%s' % ('/usr/local/CyberCP/tmp', str(randint(1000, 9999)))
|
||||
@@ -2049,7 +2060,7 @@ $parameters = array(
|
||||
|
||||
StagingPath = f'/home/{website.domain}/public_html'
|
||||
|
||||
command = f'{FinalPHPPath} -d error_reporting=0 /usr/bin/wp core download --path={StagingPath}'
|
||||
command = f'{FinalPHPPath} -d error_reporting=0 /usr/bin/wp core download --path={StagingPath} --version={old_wp_version}'
|
||||
|
||||
if ProcessUtilities.executioner(command, website.externalApp) == 0:
|
||||
raise BaseException('Failed to download wp core. [404]')
|
||||
|
||||
@@ -1782,13 +1782,13 @@ var PluginsList = [];
|
||||
function AddPluginToArray(cBox, name) {
|
||||
if (cBox.checked) {
|
||||
PluginsList.push(name);
|
||||
alert(PluginsList);
|
||||
// alert(PluginsList);
|
||||
} else {
|
||||
const index = PluginsList.indexOf(name);
|
||||
if (index > -1) {
|
||||
PluginsList.splice(index, 1);
|
||||
}
|
||||
alert(PluginsList);
|
||||
// alert(PluginsList);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1797,13 +1797,13 @@ var ThemesList = [];
|
||||
function AddThemeToArray(cBox, name) {
|
||||
if (cBox.checked) {
|
||||
ThemesList.push(name);
|
||||
alert(ThemesList);
|
||||
// alert(ThemesList);
|
||||
} else {
|
||||
const index = ThemesList.indexOf(name);
|
||||
if (index > -1) {
|
||||
ThemesList.splice(index, 1);
|
||||
}
|
||||
alert(ThemesList);
|
||||
// alert(ThemesList);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1850,11 +1850,6 @@ class WebsiteManager:
|
||||
else:
|
||||
return ACLManager.loadError()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
background = ApplicationInstaller('CreateStagingNow', extraArgs)
|
||||
background.start()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user