Editing wp-config.php | WordPress.org
One of the most important files in your WordPress installation is the wp-config.php file. This file is located in the root of your WordPress file directory and contains your website’s base configuration details, such as database connection information.
When you first download WordPress, the wp-config.php file isn’t included. The WordPress setup process will create a wp-config.php file for you based on the information you provide.
Editing wp-config.php
TOPICS
Configure Database Settings
Default wp-config-sample.php
Set Database Name
Set Database User
Set Database Password
Set Database Host
Database character set
Database collation
Security Keys
Advanced Options
table_prefix
WP_SITEURL
Blog address (URL)
Moving wp-content folder
Moving plugin folder
Moving themes folder
Moving uploads folder
Modify AutoSave Interval
Post Revisions
Disable Post Revisions
Specify the Number of Post Revisions
Set Cookie Domain
Enable Multisite / Network Ability
Redirect Nonexistent Blogs
WP_DISABLE_FATAL_ERROR_HANDLER
WP_DEBUG
SCRIPT_DEBUG
Disable Javascript Concatenation
Configure Error Logging
Increasing memory allocated to PHP
Cache
Custom User and Usermeta Tables
Language and Language Directory
WordPress v3.9.6 and below
Save queries for analysis
Override of default file permissions
WordPress Upgrade Constants
Enabling SSH Upgrade Access
Alternative Cron
Disable Cron and Cron Timeout
Additional Defined Constants
Empty Trash
Automatic Database Optimizing
DO_NOT_UPGRADE_GLOBAL_TABLES
View All Defined Constants
Disable the Plugin and Theme Editor
Disable Plugin and Theme Update and Installation
Require SSL for Admin and Logins
Block External URL Requests
Disable WordPress Auto Updates
Disable WordPress Core Updates
Cleanup Image Edits
Double Check Before Saving
One of the most important files in your WordPress installation is the wp-config.php file. This file is located in the root of your WordPress file directory and contains your website’s base configuration details, such as database connection information.
When you first download WordPress, the wp-config.php file isn’t included. The WordPress setup process will create a wp-config.php file for you based on the information you provide.
You can manually create a wp-config.php file by locating the sample file named wp-config-sample.php (located in the root install-directory), editing it as required, and then saving it as wp-config.php.
Note: The contents of the wp-config-sample.php file are in a very specific order. The order matters. If you already have a wp-config.php file, rearranging the contents of the file may create errors on your blog.
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. A port number, Unix socket file path or pipe may be needed as well.
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 #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.
Default wp-config-sample.php #Default wp-config-sample.php
Note: This is an example of a default wp-config-sample.php. The values here are examples to show you what to do.
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define( 'DB_NAME', 'database_name_here' );
/** MySQL database username */
define( 'DB_USER', 'username_here' );
/** MySQL database password */
define( 'DB_PASSWORD', 'password_here' );
/** MySQL hostname */
define( 'DB_HOST', 'localhost' );[
Note: Text inside /* */ are comments, for information purposes only.
Set Database Name #Set Database Name
Replace ‘database_name_here’, with the name of your database, e.g. MyDatabaseName.
define( 'DB_NAME', 'MyDatabaseName' ); // Example MySQL database name
Top ↑
Set Database User #Set Database User
Replace ‘username_here’, with the name of your username e.g. MyUserName.
define( 'DB_USER', 'MyUserName' ); // Example MySQL username
Top ↑
Set Database Password #Set Database Password
Replace ‘password_here’, with the your password, e.g. MyPassWord.
define( 'DB_PASSWORD', 'MyPassWord' ); // Example MySQL password
wordpress.org/support/article/editing-wp-config-php
One of the most important files in your WordPress installation is the wp-config.php file. This file is located in the root of your WordPress file directory and contains your website’s base configuration details, such as database connection information.
When you first download WordPress, the wp-config.php file isn’t included. The WordPress setup process will create a wp-config.php file for you based on the information you provide.
Editing wp-config.php
TOPICS
Configure Database Settings
Default wp-config-sample.php
Set Database Name
Set Database User
Set Database Password
Set Database Host
Database character set
Database collation
Security Keys
Advanced Options
table_prefix
WP_SITEURL
Blog address (URL)
Moving wp-content folder
Moving plugin folder
Moving themes folder
Moving uploads folder
Modify AutoSave Interval
Post Revisions
Disable Post Revisions
Specify the Number of Post Revisions
Set Cookie Domain
Enable Multisite / Network Ability
Redirect Nonexistent Blogs
WP_DISABLE_FATAL_ERROR_HANDLER
WP_DEBUG
SCRIPT_DEBUG
Disable Javascript Concatenation
Configure Error Logging
Increasing memory allocated to PHP
Cache
Custom User and Usermeta Tables
Language and Language Directory
WordPress v3.9.6 and below
Save queries for analysis
Override of default file permissions
WordPress Upgrade Constants
Enabling SSH Upgrade Access
Alternative Cron
Disable Cron and Cron Timeout
Additional Defined Constants
Empty Trash
Automatic Database Optimizing
DO_NOT_UPGRADE_GLOBAL_TABLES
View All Defined Constants
Disable the Plugin and Theme Editor
Disable Plugin and Theme Update and Installation
Require SSL for Admin and Logins
Block External URL Requests
Disable WordPress Auto Updates
Disable WordPress Core Updates
Cleanup Image Edits
Double Check Before Saving
One of the most important files in your WordPress installation is the wp-config.php file. This file is located in the root of your WordPress file directory and contains your website’s base configuration details, such as database connection information.
When you first download WordPress, the wp-config.php file isn’t included. The WordPress setup process will create a wp-config.php file for you based on the information you provide.
You can manually create a wp-config.php file by locating the sample file named wp-config-sample.php (located in the root install-directory), editing it as required, and then saving it as wp-config.php.
Note: The contents of the wp-config-sample.php file are in a very specific order. The order matters. If you already have a wp-config.php file, rearranging the contents of the file may create errors on your blog.
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. A port number, Unix socket file path or pipe may be needed as well.
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 #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.
Default wp-config-sample.php #Default wp-config-sample.php
Note: This is an example of a default wp-config-sample.php. The values here are examples to show you what to do.
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define( 'DB_NAME', 'database_name_here' );
/** MySQL database username */
define( 'DB_USER', 'username_here' );
/** MySQL database password */
define( 'DB_PASSWORD', 'password_here' );
/** MySQL hostname */
define( 'DB_HOST', 'localhost' );[
Note: Text inside /* */ are comments, for information purposes only.
Set Database Name #Set Database Name
Replace ‘database_name_here’, with the name of your database, e.g. MyDatabaseName.
define( 'DB_NAME', 'MyDatabaseName' ); // Example MySQL database name
Top ↑
Set Database User #Set Database User
Replace ‘username_here’, with the name of your username e.g. MyUserName.
define( 'DB_USER', 'MyUserName' ); // Example MySQL username
Top ↑
Set Database Password #Set Database Password
Replace ‘password_here’, with the your password, e.g. MyPassWord.
define( 'DB_PASSWORD', 'MyPassWord' ); // Example MySQL password
wordpress.org/support/article/editing-wp-config-php
Eklenme Tarihi - 08-04-2020 | Son Güncelleme - 08-04-2020103 kez gösterildi.