Commit 4acbf00f authored by Sandeep Kadam's avatar Sandeep Kadam

Added logic to update WP_HOME|WP_SITEURL for standalone sites in subpath

parent c0b5b3ff
......@@ -83,6 +83,12 @@ do
ssh ${SSH_OWNER}@${_SERVER} "rm -rf ${VM_CORE_PATH}/${USER_FILES} || true";
if [ "${SITE_IS_SUBPATH}" = "YES" ] ; then
echo "Update URL in wp-config for site :- ${PROJECT_NAME}";
# Overwrite the site url in wp-config.php file
ssh ${SSH_OWNER}@${_SERVER} "cd ${VM_CORE_PATH}/${RELATIVE_DOCUMENT_ROOT}/ && sed -E -i'' '/(WP_HOME|WP_SITEURL)/d' ${RELATIVE_SETTINGS_SRC}/wp-config.php && ~/bin/wp --path=${VM_CORE_PATH}/${RELATIVE_DOCUMENT_ROOT} config set WP_HOME '${WP_SITE_URL}' && ~/bin/wp --path=${VM_CORE_PATH}/${RELATIVE_DOCUMENT_ROOT} config set WP_SITEURL '${WP_SITE_URL}'";
# stop apache, etc
APACHEVER=$(ssh -tt ${SSH_APACHE}@${_SERVER} '[ -f /bin/systemctl ] && echo -n apache24 || echo -n apache22');
if [ "${APACHEVER}" = "apache24" ] ; then
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment