I've googled a lot, and I do have found answers at WordPress SE and at stackoverflow.com. However, the answers are somewhat incomplete or doesn't work at all. Here I'll explain my problem in detail, give my progress on the problem and the obstacles I'm facing in solving the problem.
- Plugins and themes at both the websites are pre-installed, and they are exactly same.
- Uploads folder is also same.
Assumptions indicate the current status of the folders. It doesn't assumes that they are being synchronized as the following process starts.
- There is a site A and site B.
- If any posts, pages, products, images, slider images, menus, menu items, categories, SEO settings etc of site A or site B is changed then it should be changed for the other website too.
- If a post or product is published with a category containing a prefix ABC- (e.g. ABC-Windows Tips) then that post or product should only appear on site B.
I didn't come up with a reasonable solution, but I connected site B to site A's database by editing wp-config.php.
I also copy pasted the following code for both of the sites respectively:-
- My admin password for site B has been changed to the site A's password. (I'm not sure if this is going ALRIGHT or MESSED UP. If you can help me in this then that would be great.)
- The uploads folder is not being synchronized. Media items uploaded via Site A are only visible at Site A. Featured images of posts are going 404 on site B. We can either make the uploads folder to synchronize between two different web hostings. Or make it such that site B starts picking images from site 'A' uploads folder. Something like defining constants like we did for home and siteurl i.e. WP_HOME and WP_SITEURL.