home<\/em>.<\/p>\n\n\n\nLet's go through those steps in detail.<\/p>\n\n\n\n
Check which folder your website is attached to<\/h2>\n\n\n\n The first step is to figure out which folder your WordPress files are stored in.<\/p>\n\n\n\n
If the website is the main one in the account, this will usually be public_html<\/em>.<\/p>\n\n\n\nIf not, is the website a subdomain (like test.website.com<\/em>) or an addon domain (like testwebsite.com<\/em>)?<\/p>\n\n\n\nIf the website is a subdomain, go to Subdomains<\/em> in cPanel. Otherwise, go to Addon Domains<\/em>.<\/p>\n\n\n\nFor this tutorial, we're trying to find the database name for the subdomain test.website.com<\/em>. <\/p>\n\n\n\n <\/figure><\/div>\n\n\n\nOn either the Addon Domains or Subdomains page, look for your domain or subdomain.<\/p>\n\n\n\n
Next to it, you'll see which folder its files are in.<\/p>\n\n\n\n
In our case, the files are in \/public_html\/test<\/em>.<\/p>\n\n\n\n <\/figure><\/div>\n\n\n\nFind the DB_NAME in wp-config.php<\/h2>\n\n\n\n To find the WordPress database name, go to the folder where the domain's WordPress files are stored and open wp-config.php<\/em> by right-clicking and clicking \"Edit\" or \"View\".<\/p>\n\n\n\n <\/figure><\/div>\n\n\n\nLook in wp-config.php for the line with DB_NAME<\/em>. The name of the database for your website is in quotes on that line.<\/p>\n\n\n\nIn our example, the line is<\/p>\n\n\n\n
define( 'DB_NAME', 'websiteb_test' );<\/code><\/pre>\n\n\n\nSo our database name is websiteb_test<\/em>.<\/p>\n\n\n\n <\/figure><\/div>\n\n\n\nWhile you have wp-config.php<\/em> open, scroll down a bit and notice the value for $table_prefix<\/em>. Often this will be 'wp_'<\/em> but in this case it's 'wp4v_<\/em>'.<\/p>\n\n\n\n <\/figure><\/div>\n\n\n\nThis is the prefix in your table. Sometimes, if someone has messed up, you might have different WordPress installations in the same database. They will have different prefixes.<\/p>\n\n\n\n
The table prefix in wp-config.php<\/em> tells your website which prefix your website should use.<\/p>\n\n\n\nCheck the website in site_url<\/h2>\n\n\n\n The last step is to make sure that the database you think is connected to your website is in fact connected to your website.<\/p>\n\n\n\n
In cPanel, go to phpMyAdmin.<\/p>\n\n\n\n
<\/figure><\/div>\n\n\n\nExpand the database that you found in wp-config.php<\/em>.<\/p>\n\n\n\nGo to wp_options<\/em>. In this example, the prefix set in our wp-config.php<\/em> file was \"wp4v_\", so we will go to wp4v_options<\/em>.<\/p>\n\n\n\n <\/figure><\/div>\n\n\n\nLook for either siteurl<\/em> or home<\/em>. They should be the first options in your wp_options<\/em> table.<\/p>\n\n\n\nOccasionally, one might not be on that first screen. If the website is working properly, there's no need to worry. It's probably later in the table.<\/p>\n\n\n\n
You should see your website in siteurl<\/em> and\/or home<\/em>.<\/p>\n\n\n\n <\/figure><\/div>\n\n\n\nOnce you're satisfied that you're working on the correct database, you can proceed with the rest of your work.<\/p>\n","protected":false},"excerpt":{"rendered":"
When you have multiple websites installed on your hosting account, it can be tricky to track which database belongs to which WordPress installation. Given that most of the unique information belonging to a website lives in the database, you don’t want to accidentally edit the wrong one. To find which WordPress database belongs to your<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"yoast_head":"\n
How To Find Which WordPress Database Belongs To Your Website<\/title>\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\t \n\t \n\t \n