There is a website on WordPress with a database. The question is: how can I connect this database to another site? They are placed on the same hosting, only the domains are different.
2 answers
Create another SQL user, in the settings of the second site specify the host, username and password. More detailed information can be obtained from the support service of your hosting, (SQL operator) TC for connection from a third-party IP (and / or account) may require additional permissions.
- That is, if I just create a new user and register his data in the settings of the second site, it will not work. Login to the admin panel will be only from one admin account. - Archiolidius
- oneI mean the connection to the database, and then already “ideally” (!) You should get identical users, admins and content on two sites. - ferrari
- 2It is not necessary to create a new user. Just write on the second site exactly the same connection as on the first. If you fail, replace the host address (localhost) with the SQL server address of the first site. - Rijen
|
Links to posts and media files are hard-coded in the wordpress database, so if you simply connect an existing database to another, any link of one will lead to a post or a page of the source site. If you want to manage two sites from the admin panel, you can use the multi-site for WP.
|