Fundamental Website Setup Links

Use Our RSS Feed

XML Feed

Support Open Source Software

Hi, Thank you for coming to We appreciate you visiting and hope you can support us in our efforts with free and open source software.

2: WordPress Config File Setup

We want to get your files up on your web server, but we do need to do one thing first though, which is set up your WordPress config file.
Remember those database and username set up steps we did in the previous instructions? Well now you need to have those handy. What we need to do is tell WordPress what database it needs to use and also what username and password it will use to log in and add stuff to the database. WordPress comes with a sample config file called wp-config-sample.php. This file is found in the main folder of WordPress after you unzip or decompress the folder you download from the website. If you open the file in a text editor it will look like:


Notice the first 3 marked areas. This is where you will type in the database name (1), username (2), and password (3) you have already set up.

DB-CHARSET (number 4) determines what language the web server will use to encode your pages/posts. Unless you are using a non-western language for your site, you can leave this setting at it’s default.

“Secret_Key” (number 5) is a new feature that helps secure your blog. Make sure that you pick a really random set of letters and numbers.

See the setting called $table_prefix = ‘wp_’ under the username/password/database settings block? (Number 6) You MUST change this setting to something other than wp_. Too many WordPress exploits rely on knowing this setting. The best thing to do is to change this to something entirely random like 76jhuthfgd or some other jumble of numbers and letters. Good plugins and themes will not have a problem with a change to this setting, so it is not a problem changing the setting. BTW, it’s a real hassle to fix this AFTER you have set up your website, I’m talking hours of work, so don’t forget to change this now.

After you input all of this you need to save the file as a different file name, call it wp-config.php.

*****Before you do that though we need to discuss something. You really have to make sure that you do not mess up the filename during this step. Sometimes Windows or OS X will rename a text file to have a different extension such as .txt when it saves the file. So it might save the file as wp-config.php.txt and will cause a problem for us later. You may not even see the .txt part depending on how your PCs settings are set up. The important thing is in the next step where we move the files to your web server; make sure that this particular file is correctly named wp-config.php when it gets moved to the server. Don’t worry, I’ll bring this up later to remind you.*****

Now that we have the config file set up, we can move on to moving the files to your web server.

Back to the main tutorial page

5 Responses to “2: WordPress Config File Setup”

  1. […] password searches or other methods of gaining higher privileges on your server or WordPress. In my tutorial on setting up WordPress I try to stress that you should always change the generic database prefix “wp_” to […]

  2. euphoriafish says:

    Note for people who get their hosting through (and unfortunately many of us do since it is cheap): You DO have to change the “localhost” string, even though the comment right next to it says there is a 99% chance you won’t have to change it. Go-Daddy is in that one percent, apparently.

    This tutorial has more information on the ‘localhost’ thing and getting WordPress to work with Go-Daddy.

  3. the instructions are fine … BUT … some hosting providers don’t provide you with the full ‘string’ cum name of your ‘DB NAME’ or ‘DB USER’The continue to show you your ‘extension’ but not the full and complete name. You just have to wait 24 hours for the provider to respond to your request of complete info. What a drag and a flipping nuisance these hosting providers cause!

  4. roorgepesk says:

    ? ?? ?? ???????????? ? ???, ????? ??????????? ??????? ??? ???? ????, ?? ??????? ????? ? ??? ??????? ??????????

Leave a Reply

You must be logged in to post a comment.