User Manuals

Learn how to use WordPress – and take advantage of its advanced features.

  • Setup, Usage & Integration

Editing Your WordPress wp-config.php File

Now that you have set up your MySQL database and username you need to decide how you want to create your wp-config.php file for your WordPress installation.

The wp-config.php is the file contained in the root of your WordPress file directory which contains the login information for WordPress to connect to your MySQL database(s) as well as table prefix, secret keys, WordPress language and ABSPATH.

You can either:

  1. Create and edit the wp-config.php file yourself,
  2. Or skip this step and let WordPress try to do this itself when you run the installation script using the web interface. If you skip this step go to Installing WordPress using FTP.

The safest way is to manually create your wp-config.php file following the instructions below as the installation script using the web interface doesn’t work for all server setups.

Downloading WordPress

1. Download the zip version of  WordPress from
2. Unzip the downloaded file to a folder on your hard drive.

Renaming the wp-config-sample.php file to wp-config.php

1.  Locate the wp-config-sample.php file within the wordpress folder inside the wordpress folder you unzipped.
2.  Rename wp-config-sample.php file to wp-config.php

Rename your config file

Edit your wp-config.php

You now need to edit your wp-config.php file for your installation.

You should do this using a Text Editor program such as EditPlus. EditPlus is a text editor, HTML editor and programmer’s editor for Windows. While you could edit in NotePad, EditPlus offers many powerful features that makes it better suited for editing PHP.

For Mac Users try:

  1. Smultron – free Text Edit software designed for Macs
  2. Textmate – Text Edit software you purchase designed for Macs – very good and better suited to text editing

Please note:

  • You must use a text editor program which edits files in plain text  format as non-text based word processing program such as Microsoft Word can cause major problems to code when used to edit PHP files.

You use EditPlus3 as follows to edit your wp-config.php file:

1. Download and install EditPlus3.
2. Locate your wp-config.php file on your hard drive.
3.  Right mouse click on your wp-config.php file and select EditPlus 3 to open your wp-config.php file for editing using EditPlus 3.

Open using EditPlus

4.   Change the wp-config.php file for your installation by adding:

  • Your database name
  • Your username used to access the database
  • Your password used to access your Database
  • The host name of your database server — the host name is usually localhost but if concerned you can confirm by contacting or searching your hosting company’s online documentation.

These are all the details that you set up when you created your MySQL database and user.

Add your database details

5.  Go to the WordPress secret key generator to grab authentication unique keys and salts then add them to your wp-config.php file.

  • These values can be anything you want them to be — it is just easier to auto-generate them using the key generator
  • These values help WordPress operate securely

Add your authenication keys

6.  Finally save all changes to your wp-config.php file and close EditPlus3.