Beranda > Blog, Codex Tool's, Database, My SQL, PHP, Plugin, Rank, Souce Code, Source Code, Tips Trik, Tools, Wordpress > Configuration Installation WordPress.org "Editing wp-config.php"

Configuration Installation WordPress.org "Editing wp-config.php"

05/12/2010

Codex : Editing wp-config.php

WARNING: Before editing this page.

Please, do not edit this Codex Page with the settings for your own server as you are giving the world access to your website’s MySQL password, and will not make your install work. Thanks.

As part of the WordPress installation, you must modify the wp-config.php file to define the WordPress configuration settings required to access your MySQL database.
This file, wp-config.php, does not exist in a downloaded copy of WordPress; you need to create it. The wp-config-sample.php file is provided as an example to work from. Advanced settings and examples are provided below.
To change the wp-config.php file for your installation, you will need this information :

  • Database Name
  • Database Name used by WordPress
  • Database Username
  • Username used to access Database
  • Database Password
  • Password used by Username to access Database
  • Database Host
  • The hostname of your Database Server

If your hosting provider installed WordPress for you, get the information from them. If you manage your own web server or hosting account, you will have this information as a result of creating the database and user.

Configure Database Settings

Important: never use a word processor like Microsoft Word for editing WordPress files!
Locate the file wp-config-sample.php in the base directory of your WordPress directory and open in a text editor.

NOTE: Since Version 2.6, wp-config.php can be moved to the directory directly above the WordPress application directory.

Default wp-config-sample.php

This is an example of a default wp-config-sample.php. The values here are examples to show you what to do. You need to make changes on your own web site not here. If you make changes here by using the edit button, they will not work and you will be showing your password details to the world.
// ** MySQL settings – You can get this info from your web host ** //
/** The name of the database for WordPress */
define(‘DB_NAME’,putyourdbnamehere’);
/** MySQL database username */
define(‘DB_USER’,usernamehere’);
/** MySQL database password */
define(‘DB_PASSWORD’,yourpasswordhere’);
/** MySQL hostname */
define(‘DB_HOST’, localhost’);

NOTE: Text inside /* */ are comments, for information purposes only.
NOTE: Do not change these details here by editing this page, change them on your web server.

 
Set Database Name
 

Replace putyourdbnamehere, with the name of your database, e.g. MyDatabaseName.

define('DB_NAME', 'MyDatabaseName'); // Example MySQL database name

Set Database User

Replace usernamehere, with the name of your username e.g. MyUserName.

define('DB_USER', 'MyUserName'); // Example MySQL username

Set Database Password

Replace yourpasswordhere, with the your password, e.g. MyPassWord.

define('DB_PASSWORD', 'MyPassWord'); // Example MySQL password

Set Database Host

Replace localhost, with the name of your database host, e.g. MyDatabaseHost.

define('DB_HOST', 'MyDatabaseHost'); // Example MySQL Database host
NOTE: There is a good chance you will NOT have to change it. If you are unsure, try installing with the default value of 'localhost' and see if it works. If the install fails, contact your web hosting provider.

Possible DB_HOST values

Different hosting companies use different network settings for their mysql database’s. If your hosting company is listed below in the left column, the value on the right is similar to the correct value for DB_HOST. Contact your tech support and/or search your hosting companies online Documentation to be sure.

%
%d blogger menyukai ini: