Hi Richard,
Changing the main domain of the multisite should actually begin in the database *.
You will need to update at least the following tables and options (shown in parentheses).
* Remember to create a full backup before editing the database.
wp_options (siteurl, home)
wp_site (domain)
wp_sitemeta (siteurl)
wp_blogs (domain)
You would also need to update the wp_options table for each subsite, changing the siteurl and home options.
NB: Make sure to pay attention to whether the protocol (HTTP) needs to be specified or not. Options in the following tables should not have a protocol specified: wp_site and wp_blogs.
You can find a detailed guide over here.
Hope this helps.
Kind regards,
Mwale
Hi Mwale,
Thanks for your reply, I already found these things on the internet and changed it but I think I’m still missing something.
I have already 5 websites active. refhair.nl is active with site-id 1.
goodbeauty.eu has to become main site and has site id nr 5.
I thought if I put the id numbers in the config-file would be enough? But images are not following site id number anymore… (broken links) and also formatting is gone…
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false);
define('DOMAIN_CURRENT_SITE', 'goodbeauty.eu');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 5);
define('BLOG_ID_CURRENT_SITE', 5);
If I change everything to goodbeauty in the database I loose refhair website…
Isn’t there an easier way to switch websites? Or just a trick to repair the broken links …?
kind Regards,
Richard
Hey Richard,
I think I found a thread that has a solution to your problem.
You asked about an easier way to do the switch. On the above thread, there is also a suggestion to use the All in one migration plugin. Something like so:
export new.example.com with ID 5 and
re-import it into example.com with ID 1
As always remember to take a backup ;).
Let me know how it goes.
Cheers!
Hi Mwale,
Thanks a lot I’m going to try this, I’ll keep you informed!
Richard
Hi Mwale,
I did not use the all in one migration plugin, it was to expensive for this project. At the end I changed ID numbers;
define(‘SITE_ID_CURRENT_SITE’, 1);
define(‘BLOG_ID_CURRENT_SITE’, 5);
In the end I manually put the missing (link) photos in the root uploads folder and relinked them via the “Media Sync” plugin that worked.
Hey Richard,
That’s awesome!
Glad you got it working, and thanks for coming back to share the solution!
Kind regards.