Remove duplicate part
This commit is contained in:
@@ -323,46 +323,6 @@ def setupwordpress(self, data):
|
|||||||
raise SiteError("generate wp-config failed for wp single site")
|
raise SiteError("generate wp-config failed for wp single site")
|
||||||
except CommandExecutionError:
|
except CommandExecutionError:
|
||||||
raise SiteError("generate wp-config failed for wp single site")
|
raise SiteError("generate wp-config failed for wp single site")
|
||||||
try:
|
|
||||||
|
|
||||||
WOShellExec.cmd_exec(self, "bash -c \"php {0} --allow-root "
|
|
||||||
.format(WOVariables.wo_wpcli_path) +
|
|
||||||
"config set WP_CACHE_KEY_SALT "
|
|
||||||
"\'{0}:\'\"".format(wo_domain_name))
|
|
||||||
|
|
||||||
WOShellExec.cmd_exec(self, "bash -c \"php {0} --allow-root "
|
|
||||||
.format(WOVariables.wo_wpcli_path) +
|
|
||||||
"config set WP_MEMORY_LIMIT "
|
|
||||||
"\'128M\'\"")
|
|
||||||
WOShellExec.cmd_exec(self, "bash -c \"php {0} --allow-root "
|
|
||||||
.format(WOVariables.wo_wpcli_path) +
|
|
||||||
"config set WP_MAX_MEMORY_LIMIT "
|
|
||||||
"\'256M\'\"")
|
|
||||||
WOShellExec.cmd_exec(self, "bash -c \"php {0} --allow-root "
|
|
||||||
.format(WOVariables.wo_wpcli_path) +
|
|
||||||
"config set CONCATENATE_SCRIPTS "
|
|
||||||
"false --raw\"")
|
|
||||||
WOShellExec.cmd_exec(self, "bash -c \"php {0} --allow-root "
|
|
||||||
.format(WOVariables.wo_wpcli_path) +
|
|
||||||
"config set WP_POST_REVISIONS "
|
|
||||||
"\'10\'\"")
|
|
||||||
WOShellExec.cmd_exec(self, "bash -c \"php {0} --allow-root "
|
|
||||||
.format(WOVariables.wo_wpcli_path) +
|
|
||||||
"config set MEDIA_TRASH "
|
|
||||||
"true --raw\"")
|
|
||||||
WOShellExec.cmd_exec(self, "bash -c \"php {0} --allow-root "
|
|
||||||
.format(WOVariables.wo_wpcli_path) +
|
|
||||||
"config set EMPTY_TRASH_DAYS "
|
|
||||||
"\'15\'\"")
|
|
||||||
WOShellExec.cmd_exec(self, "bash -c \"php {0} --allow-root "
|
|
||||||
.format(WOVariables.wo_wpcli_path) +
|
|
||||||
"config set WP_AUTO_UPDATE_CORE "
|
|
||||||
"minor\"")
|
|
||||||
|
|
||||||
except CommandExecutionError as e:
|
|
||||||
Log.debug(self, str(e))
|
|
||||||
Log.error(self, "Unable to define extra variable in wp-config.php")
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
Log.debug(self, "Generating wp-config for WordPress multisite")
|
Log.debug(self, "Generating wp-config for WordPress multisite")
|
||||||
Log.debug(self, "bash -c \"php {0} --allow-root "
|
Log.debug(self, "bash -c \"php {0} --allow-root "
|
||||||
@@ -400,48 +360,48 @@ def setupwordpress(self, data):
|
|||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
raise SiteError("generate wp-config failed for wp multi site")
|
raise SiteError("generate wp-config failed for wp multi site")
|
||||||
except CommandExecutionError as e:
|
except CommandExecutionError:
|
||||||
raise SiteError("generate wp-config failed for wp multi site")
|
raise SiteError("generate wp-config failed for wp multi site")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
||||||
WOShellExec.cmd_exec(self, "bash -c \"php {0} --allow-root "
|
WOShellExec.cmd_exec(self, "bash -c \"php {0} --allow-root "
|
||||||
.format(WOVariables.wo_wpcli_path) +
|
.format(WOVariables.wo_wpcli_path) +
|
||||||
"config set WP_CACHE_KEY_SALT "
|
"config set WP_CACHE_KEY_SALT "
|
||||||
"\'{0}:\'\"".format(wo_domain_name))
|
"\'{0}:\'\"".format(wo_domain_name))
|
||||||
|
|
||||||
WOShellExec.cmd_exec(self, "bash -c \"php {0} --allow-root "
|
WOShellExec.cmd_exec(self, "bash -c \"php {0} --allow-root "
|
||||||
.format(WOVariables.wo_wpcli_path) +
|
.format(WOVariables.wo_wpcli_path) +
|
||||||
"config set WP_MEMORY_LIMIT "
|
"config set WP_MEMORY_LIMIT "
|
||||||
"\'128M\'\"")
|
"\'128M\'\"")
|
||||||
WOShellExec.cmd_exec(self, "bash -c \"php {0} --allow-root "
|
WOShellExec.cmd_exec(self, "bash -c \"php {0} --allow-root "
|
||||||
.format(WOVariables.wo_wpcli_path) +
|
.format(WOVariables.wo_wpcli_path) +
|
||||||
"config set WP_MAX_MEMORY_LIMIT "
|
"config set WP_MAX_MEMORY_LIMIT "
|
||||||
"\'256M\'\"")
|
"\'256M\'\"")
|
||||||
WOShellExec.cmd_exec(self, "bash -c \"php {0} --allow-root "
|
WOShellExec.cmd_exec(self, "bash -c \"php {0} --allow-root "
|
||||||
.format(WOVariables.wo_wpcli_path) +
|
.format(WOVariables.wo_wpcli_path) +
|
||||||
"config set CONCATENATE_SCRIPTS "
|
"config set CONCATENATE_SCRIPTS "
|
||||||
"false --raw\"")
|
"false --raw\"")
|
||||||
WOShellExec.cmd_exec(self, "bash -c \"php {0} --allow-root "
|
WOShellExec.cmd_exec(self, "bash -c \"php {0} --allow-root "
|
||||||
.format(WOVariables.wo_wpcli_path) +
|
.format(WOVariables.wo_wpcli_path) +
|
||||||
"config set WP_POST_REVISIONS "
|
"config set WP_POST_REVISIONS "
|
||||||
"\'10\'\"")
|
"\'10\'\"")
|
||||||
WOShellExec.cmd_exec(self, "bash -c \"php {0} --allow-root "
|
WOShellExec.cmd_exec(self, "bash -c \"php {0} --allow-root "
|
||||||
.format(WOVariables.wo_wpcli_path) +
|
.format(WOVariables.wo_wpcli_path) +
|
||||||
"config set MEDIA_TRASH "
|
"config set MEDIA_TRASH "
|
||||||
"true --raw\"")
|
"true --raw\"")
|
||||||
WOShellExec.cmd_exec(self, "bash -c \"php {0} --allow-root "
|
WOShellExec.cmd_exec(self, "bash -c \"php {0} --allow-root "
|
||||||
.format(WOVariables.wo_wpcli_path) +
|
.format(WOVariables.wo_wpcli_path) +
|
||||||
"config set EMPTY_TRASH_DAYS "
|
"config set EMPTY_TRASH_DAYS "
|
||||||
"\'15\'\"")
|
"\'15\'\"")
|
||||||
WOShellExec.cmd_exec(self, "bash -c \"php {0} --allow-root "
|
WOShellExec.cmd_exec(self, "bash -c \"php {0} --allow-root "
|
||||||
.format(WOVariables.wo_wpcli_path) +
|
.format(WOVariables.wo_wpcli_path) +
|
||||||
"config set WP_AUTO_UPDATE_CORE "
|
"config set WP_AUTO_UPDATE_CORE "
|
||||||
"minor\"")
|
"minor\"")
|
||||||
|
|
||||||
except CommandExecutionError as e:
|
except CommandExecutionError as e:
|
||||||
Log.debug(self, str(e))
|
Log.debug(self, str(e))
|
||||||
Log.error(self, "Unable to define extra variable in wp-config.php")
|
Log.error(self, "Unable to define extra variable in wp-config.php")
|
||||||
|
|
||||||
# WOFileUtils.mvfile(self, os.getcwd()+'/wp-config.php',
|
# WOFileUtils.mvfile(self, os.getcwd()+'/wp-config.php',
|
||||||
# os.path.abspath(os.path.join(os.getcwd(), os.pardir)))
|
# os.path.abspath(os.path.join(os.getcwd(), os.pardir)))
|
||||||
|
|||||||
Reference in New Issue
Block a user