Are you trying to have 3 WP installations which all use the same DB? And use the same tables as well? Why not delete the physical subdirectories and extra installations and let the countries be an unimportant part of the WP permalink? As long as there are no pages or posts named “uk” or “usa”, that portion of the permalink will be ignored. As long as the actual page or post name is correct, it’ll be served regardless of extra terms in the permalink. These links would all go to a post named “hello-world” without any special effort:
example.info/hello-world/
example.info/usa/hello-world/
example.info/uk/hello-world/
example.info/meaningless/terms/hello-world/
Thread Starter
vijayj
(@vijayj)
Sorry I didn’t get the answer correctly.
Can you explain a little about it.Or please share some document.
In my case ,all the pages in the website should be included in the sub directies too.
So all the sub directries will be the duplicate of the main website.
If each subdirectory will have the exact same content, you shouldn’t want to replicate WP a number of times. More work than necessary in maintenance. It can all be served from the same WP installation through different “virtual” URLs. WP ignores permalink terms it doesn’t understand, so you can insert arbitrary terms at will.
The added benefit is you will not get penalized by search engines for having identical content at different URLs, provided the canonical link tag is the same in all cases.
Thinking about such a scheme some more, it would be best to formalize the country terms as part of the rewrite rule set so requests not involving post and page names are handled correctly.
If you would rather have multiple installations, that’s fine too. It’s your site 🙂 AFAIK they can all utilize the same DB tables. There might be an issue with edit locks working correctly if the same user is logged into more than one installation at a time.