Answer the question
In order to leave comments, you need to log in
How to create two sites on the same database?
Good afternoon, two WordPress sites, the content is the same, but the domains are different.
I was able to connect two sites to the same database, even to the same tables, but only if we go to the same address, for example, sity.ru, then everything is fine (it was created first and accordingly recorded in wp_options )
And if we want to switch to sity. com he will transfer us again to city.ru
Is there a way to solve it?
Or is it better to do different prefixes and when adding, duplicate information in different tables?
Answer the question
In order to leave comments, you need to log in
The easiest option for you is WordPress MultiSite.
Turn on the multisite mode and you can create as many sites as you like. One database. some tables will be generic and some tables will differ in prefixes for different sites.
https://wp-kama.ru/handbook/wordpress/ustanovka-mu...
It is unlikely that you will be able to fully use one database for two sites. The developers did not provide for this, and accordingly the links will not be correct for you (not everywhere). It is also likely that users will have incorrect cookies, because. they are bound to the domain. From an SEO point of view, this is also not very good ...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question