What is wp-config.php

The programming language used by WordPress is PHP, and the wp-config.php file is one of the most important, core files used by the WordPress software. As the name of the file suggests, wp-config.php is where critically important values or configurations are stored, including passwords and advanced options.

When you install WordPress, there won’t be a wp-config.php file, but there will be a file called wp-config-sample.php that can be renamed and configured to use with your WordPress site.

Every time your WordPress site is visited, the wp-config.php will be accessed and used to communicate between the database in order to retrieve or store information, including users, posts, pages, and settings.

Pro tip: Before making any changes to the wp-config.php file, make a copy first so that you can revert back to the original settings in case something goes wrong.

Below is one of the most important sections of the wp-config.php file:


As you can see, it shows the name of your database, information about the administrator password and administrator password, and the address or location of the host.

Here is the other section of the wp-config.php file:

These are advanced options, so be very careful when modifying these settings!

The following two tabs change content below.


My name is Jamie Spencer and I have spent the past 5 years building money making blogs. After growing tired of the 9-5, commuting and never seeing my family I decided that I wanted to make some changes and launched my first blog. Since then I have launched lots of successful niche blogs and after selling my survivalist blog I decided to teach other people how to do the same.