All we need is an easy explanation of the problem, so here it is.
I have a WordPress website and I cloned it to another website(domain) using a plugin called Duplicator. So in the backend, phpMyAdmin, I’ve two different databases but all the tables in both databases have the same names.
I just want to make sure that this does not have any kind of bad effects.
How to solve :
I know you bored from this bug, So we are here to help you! Take a deep breath and look at the explanation of your problem. We have many solutions to this problem, But we recommend you to use the first method because it is tested & true method that will 100% work for you.
Method 1
No problem.
USE mumer_watches;
SELECT ... FROM wp58_posts
will refer, unambiguously, to the table mumer_watches.wp58_posts
. Ditto for
SELECT ... FROM mumer_watches.wp58_posts
Assuming this is WordPress, well, that’s the way it works.
Method 2
word press has a variable for the database, as long as you have the configuration correct it will apply to all script automatically.
So you have no worries about which database you are using
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define( 'DB_NAME', 'database_name_here' );
explanation for the config file
If you want to know mre abour identifiers
and maria db
Note: Use and implement method 1 because this method fully tested our system.
Thank you 🙂
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0