{"id":57965,"date":"2011-10-01T12:51:36","date_gmt":"2011-10-01T16:51:36","guid":{"rendered":"http:\/\/wpmu.org\/?p=57965"},"modified":"2022-03-15T23:04:58","modified_gmt":"2022-03-15T23:04:58","slug":"daily-tip-how-to-find-the-hostname-of-your-database-server-when-installing-wordpress","status":"publish","type":"post","link":"https:\/\/wpmudev.com\/blog\/daily-tip-how-to-find-the-hostname-of-your-database-server-when-installing-wordpress\/","title":{"rendered":"How to Find the Hostname of Your Database Server When Installing WordPress"},"content":{"rendered":"<p>If you&#8217;re setting up a brand new installation of WordPress, you will need to know the value to put in your wp-config.php file for <strong>Database Host<\/strong>.<\/p>\n<p>Be aware that this is not the same value for everyone who is installing WordPress. It&#8217;s unique to your hosting company.<\/p>\n<p>Here&#8217;s an example of what we&#8217;re looking at:<\/p>\n<p><code>define('DB_HOST', 'MyDatabaseHost'); \/\/ Example MySQL Database host<\/code><\/p>\n<p>Most of the time the <strong>DB_HOST<\/strong> value is going to be <em>localhost<\/em>. However, it varies depending on your host. For example, DreamHost might have a value of <em>mysql.example.com<\/em> and 1and1 might have a value that looks something like this: <em>db12345678<\/em>. It depends on where your host stores the databases for your particular hosting account.<\/p>\n<p>The WordPress codex has a list of possible values for a handful of hosting companies on the <a href=\"https:\/\/wordpress.org\/support\/article\/editing-wp-config-php\/\" rel=\"noopener\" target=\"_blank\">Editing wp-config.php<\/a> page. If you&#8217;re not sure, just check your host&#8217;s documentation or contact tech support. They&#8217;ll be able to let you know the hostname for your database server.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The database hostname value is unique to your hosting company. Here are some clues for finding it.<\/p>\n","protected":false},"author":4099,"featured_media":207201,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"blog_reading_time":"","wds_primary_category":0,"wds_primary_tutorials_categories":0,"footnotes":""},"categories":[263],"tags":[1004],"tutorials_categories":[],"class_list":["post-57965","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-database"],"_links":{"self":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/57965","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/users\/4099"}],"replies":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/comments?post=57965"}],"version-history":[{"count":4,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/57965\/revisions"}],"predecessor-version":[{"id":204925,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/57965\/revisions\/204925"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/media\/207201"}],"wp:attachment":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/media?parent=57965"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/categories?post=57965"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/tags?post=57965"},{"taxonomy":"tutorials_categories","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/tutorials_categories?post=57965"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}