Synchronising database tables, staging & production
-
Good morning from Chennai, South India
I have been working over the last couple of week on synchronising 2 multisites,
1. a live site released a few months back with 2 blogs on it.
2. a staging server with a number of additional sites that need to be transferred onto the live site.Q1: Anyone knows of a good tutorial/documentation to do the above properly?
In order to maintain the live content, I adopted this approach with some pains,
1. replicate the live site as pre-live v2.0 site.
2. create missing blogs on this site (basically the new blogs that need to be added
3. overwrite the blog tableswp_X_...
form the staging server, keeping care to keep the new live site’s blog IDs preserved.
4. update domain urls using interconnect/it excellent DB search & replace scriptHowever, this was not sufficient, as I came across strange errors resulting from some sites having null values returned by the function
get_editable_roles()
.Turns out that user roles for each site is stored in the
wp_X_options
table using a option key name with the blog,wp_X_user_roles
.Q2: To WP core developpers, why use key name with the blog ID within a table that already holds the blog id information? Couldn’t user roles simply be stored under the key
wp_user_roles
?Q3: Am I missing other potential keys/DB values that I should be updating when updating a multisite DB where blog IDs do not match from one site to the next?
PS: At this point the pre-live v2.0 is working rather well, no strange errors anymore, so maybe the above report mya help someone else. I will monitor this thread and compile a post/tutorial on our main site [moderated]
- The topic ‘Synchronising database tables, staging & production’ is closed to new replies.