From 21d647d2e3f1b00204231f8a467e9a44d36dc895 Mon Sep 17 00:00:00 2001 From: Usman Nasir Date: Tue, 31 Aug 2021 13:26:48 +0500 Subject: [PATCH] bug fix: wp staging --- websiteFunctions/StagingSetup.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/websiteFunctions/StagingSetup.py b/websiteFunctions/StagingSetup.py index a63e783b2..059841468 100644 --- a/websiteFunctions/StagingSetup.py +++ b/websiteFunctions/StagingSetup.py @@ -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)