mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-06 13:25:51 +01:00
bug fix: wp staging
This commit is contained in:
@@ -95,24 +95,24 @@ class StagingSetup(multi.Thread):
|
||||
|
||||
## Creating WP Site and setting Database
|
||||
|
||||
command = '%s -d error_reporting=0 wp core download --path=%s' % (FinalPHPPath, path)
|
||||
command = '%s -d error_reporting=0 /usr/bin/wp core download --path=%s' % (FinalPHPPath, path)
|
||||
ProcessUtilities.executioner(command, website.externalApp)
|
||||
|
||||
logging.statusWriter(tempStatusPath, 'Creating and copying database..,50')
|
||||
|
||||
dbNameRestore, dbUser, dbPassword = ApplicationInstaller(None, None).dbCreation(tempStatusPath, website)
|
||||
|
||||
command = '%s -d error_reporting=0 wp core config --dbname=%s --dbuser=%s --dbpass=%s --dbhost=%s:%s --path=%s' % (FinalPHPPath, dbNameRestore, dbUser, dbPassword, ApplicationInstaller.LOCALHOST, ApplicationInstaller.PORT, path)
|
||||
command = '%s -d error_reporting=0 /usr/bin/wp core config --dbname=%s --dbuser=%s --dbpass=%s --dbhost=%s:%s --path=%s' % (FinalPHPPath, dbNameRestore, dbUser, dbPassword, ApplicationInstaller.LOCALHOST, ApplicationInstaller.PORT, path)
|
||||
ProcessUtilities.executioner(command, website.externalApp)
|
||||
|
||||
## Exporting and importing database
|
||||
|
||||
command = '%s -d error_reporting=0 wp --allow-root --skip-plugins --skip-themes --path=%s db export %s/dbexport-stage.sql' % (FinalPHPPath, masterPath, path)
|
||||
command = '%s -d error_reporting=0 /usr/bin/wp --allow-root --skip-plugins --skip-themes --path=%s db export %s/dbexport-stage.sql' % (FinalPHPPath, masterPath, path)
|
||||
ProcessUtilities.executioner(command)
|
||||
|
||||
## Import
|
||||
|
||||
command = '%s -d error_reporting=0 wp --allow-root --skip-plugins --skip-themes --path=%s --quiet db import %s/dbexport-stage.sql' % (FinalPHPPath, path, path)
|
||||
command = '%s -d error_reporting=0 /usr/bin/wp --allow-root --skip-plugins --skip-themes --path=%s --quiet db import %s/dbexport-stage.sql' % (FinalPHPPath, path, path)
|
||||
ProcessUtilities.executioner(command)
|
||||
|
||||
try:
|
||||
@@ -123,7 +123,7 @@ class StagingSetup(multi.Thread):
|
||||
|
||||
## Sync WP-Content Folder
|
||||
|
||||
command = '%s -d error_reporting=0 wp theme path --skip-plugins --skip-themes --allow-root --path=%s' % (FinalPHPPath, masterPath)
|
||||
command = '%s -d error_reporting=0 /usr/bin/wp theme path --skip-plugins --skip-themes --allow-root --path=%s' % (FinalPHPPath, masterPath)
|
||||
WpContentPath = ProcessUtilities.outputExecutioner(command).splitlines()[-1].replace('themes', '')
|
||||
|
||||
command = 'cp -R %s %s/' % (WpContentPath, path)
|
||||
@@ -136,13 +136,13 @@ class StagingSetup(multi.Thread):
|
||||
|
||||
## Search and replace url
|
||||
|
||||
command = '%s -d error_reporting=0 wp search-replace --skip-plugins --skip-themes --allow-root --path=%s "%s" "%s"' % (FinalPHPPath, path, replaceDomain, domain)
|
||||
command = '%s -d error_reporting=0 /usr/bin/wp search-replace --skip-plugins --skip-themes --allow-root --path=%s "%s" "%s"' % (FinalPHPPath, path, replaceDomain, domain)
|
||||
ProcessUtilities.executioner(command)
|
||||
|
||||
command = '%s -d error_reporting=0 wp search-replace --skip-plugins --skip-themes --allow-root --path=%s "www.%s" "%s"' % (FinalPHPPath, path, replaceDomain, domain)
|
||||
command = '%s -d error_reporting=0 /usr/bin/wp search-replace --skip-plugins --skip-themes --allow-root --path=%s "www.%s" "%s"' % (FinalPHPPath, path, replaceDomain, domain)
|
||||
ProcessUtilities.executioner(command)
|
||||
|
||||
command = '%s -d error_reporting=0 wp search-replace --skip-plugins --skip-themes --allow-root --path=%s "https://%s" "http://%s"' % (
|
||||
command = '%s -d error_reporting=0 /usr/bin/wp search-replace --skip-plugins --skip-themes --allow-root --path=%s "https://%s" "http://%s"' % (
|
||||
FinalPHPPath, path, domain, domain)
|
||||
ProcessUtilities.executioner(command)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user