Find the answers you need

Support Database

Simple guide: wp-config.php - what it is and what you should know

The wp-config.php is an essential file for any WordPress site. Without your website will not work properly.

What is the wp-config.php?

The wp-config.php file is basically a blueprint for your WordPress website. It contains the crucial information WordPress needs to connect to your sites database, like database name, username and password. It also contains security keys to protect your website.

Creating a wp-config.php file

The wp-config.php file does not exist when you download WordPress. It is created in the installation process. If you have a WordPress optimised hosting, like with 20i, it will ab be done automatically and you don’t have to worry about a thing.

If, however, your hosting provider does not provide this service, you have to fill in the relevant data from your hosting provider in the installation process.

wp-config php setup in WordPress install wizard

For most WordPress users this will be it and the wp-config.php file does not need any more attention.

But if you need to make changes to it, you need to locate it first.

Where is the wp-config.php and how to access it?

The file is typically located in the root folder of your WordPress installation. It can be easy accessed with the file manager via your My20i control panel (or any other control panel) or you can use a FTP-client to access the file.

wp-config php location

Reasons to edit the wp-config.php file

There are some reasons why you would like to access the wp-config.php file and make changes to it, but it is imperative to make a backup of the original file before you make any changes and if you are not confident, please contact a developer before making any changes.

Some reasons why you want to make changes to the file:
  • Changing database connection details: If you need to change the database connection details for your WordPress website, you will need to edit the wp-config.php file. This could be necessary if you are moving your website to a new server, or if your database login details have changed.
  • Updating security keys and salts: The file contains security keys and salts that are used to improve the security of your WordPress website. These keys and salts should be changed regularly to prevent unauthorized access to your website.
  • Modifying debugging settings: The wp-config.php contains debugging settings that can be used to troubleshoot errors and issues with your website. If you are a developer or a technical user, you may need to modify these settings to get more detailed information about errors on your website.
  • Changing language settings: If you want to change the language of your WordPress website, you can modify the wp-config.php to specify the desired language.
  • Changing the WordPress table prefix: It contains the table prefix for the WordPress database tables. Changing the table prefix can help to improve the security of your website by making it more difficult for hackers to access or modify the database.
  • Enabling and disabling WordPress features: The wp-config.php file can be used to enable or disable certain features of WordPress, such as automatic updates, post revisions, and caching. These settings can be modified to optimize the performance of your website.

Please always make sure to have made a backup before making changes to the file and that you know what you are doing.

Managed WordPress Hosting small CTA