I’m having issues mapping my multisite domain with beaver builder. Thing is i’m not entirely sure of the correct way to do this…
I am doing the following:
Create a new multisite blog
Use page builder to create the page
Set up domain mapping with primary domain enabled to redirect the domain
Logging into mysql to issue the following search and replace commands:
update wp_<SITE ID>_options set option_value = replace(option_value,'http://OLD_WEBSITEURL.com','http://NEW_WEBSITEURL.com');
update wp_<SITE ID>_postmeta set meta_value = replace(meta_value,'http://OLD_WEBSITEURL.com','http://NEW_WEBSITEURL.com');
update wp_<SITE ID>_posts set post_content = replace(post_content,'http://OLD_WEBSITEURL.com','http://NEW_WEBSITEURL.com');
update wp_<SITE ID>_posts set guid = replace(guid,'http://OLD_WEBSITEURL.com','http://NEW_WEBSITEURL.com');
update wp_<SITE ID>_posts set pinged = replace(pinged,'http://OLD_WEBSITEURL.com','http://NEW_WEBSITEURL.com');
update wp_<SITE ID>_comments set comment_content = replace(comment_content,'http://OLD_WEBSITEURL.com','http://NEW_WEBSITEURL.com');
This seems to end up with the site loading but the page doesn’t display correctly. Looking at the source it looks like the above mysql commands aren’t searching and replacing everything. The php script referenced in the knowledge base i’m wary of using on a multisite database.
Can anyone point me to the correct way to do domain mapping with beaver builder?
The problem might be caused by how you’re replacing the old URL with the new URL. BB data is stored in a serialized array. I’m not really familiar with your method but I’m guessing it broke the serialization. Could you try using the Serialized Search and Replace script to do that instead and see if it works?
Hi. I ran the php script. It said that the only table that I missed was url logs for the Wordfence plugin. I updated that table.
When I open the pagebuilder as if to edit the page. All the html displays screwed up. Also if I load the site itself with the page, its screwed up too.
I find this odd, because I already moved a domain using this same method and though I had problems there, you guys logged in and resolvec them - and then issued a bug fix.
Any idea whats going on here? I’m stuck.
I need a working and repeatable way to do this… As I can’t create sites for clients without being able to build them in a none-live environment first.
OK an update on this - I think I have found a bug that I can reproduce.
I created a bash script to update the site via the mysql commands above.
If I enable domain mapping and then update the domain url via the script, the pagebuilder page code gets screwed up.
If I then disable the domain mapping and use the script to set the domain back to the mulitsite domain, then the pagebuilder displays the code correctly again.
Here is the bash script:
#!/usr/bin/env bash
MYSQLUSR='<username>'
MYSQLPASS='<password>'
DB=<your db name>
if [[ -n "$1" && -n "$2" && -n "$3" ]]
then
OLDURL=$1
NEWURL=$2
SITEID=$3
else
echo -e "\nARGUMENTS: <OLDURL> <NEWURL> <SITEID>"
exit
fi
echo -e "\nOLDURL = $OLDURL"
echo "NEWURL = $NEWURL"
echo "SITEID = $SITEID"
echo -e "\nHit enter to proceed...."
read A
mysql --verbose --user=$MYSQLUSR --password=$MYSQLPASS << END
use $DB;
update wp_${SITEID}_options set option_value = replace(option_value,'$OLDURL','$NEWURL');
update wp_${SITEID}_postmeta set meta_value = replace(meta_value,'$OLDURL','$NEWURL');
update wp_${SITEID}_posts set post_content = replace(post_content,'$OLDURL','$NEWURL');
update wp_${SITEID}_posts set guid = replace(guid,'$OLDURL','$NEWURL');
update wp_${SITEID}_posts set pinged = replace(pinged,'$OLDURL','$NEWURL');
update wp_${SITEID}_comments set comment_content = replace(comment_content,'$OLDURL','$NEWURL');
END
I scrapped my scripts and tried the search and replace method. After some wierdness things appear to be okay now. So i’ll stick with this from now on. Thanks.