目录
WordPress会把数据库的相关信息存在wp-config.php文件中。如果编辑有问题,则会出现建立数据库连接时出错 问题。
有的wordpress中可能没有wp-config.php文件,有的是wp-config-sample.php文件,这时候就需要我们复制一份。
cp /wordpress/wp-config-sample.php /wordpress/wp-config.php
接下来就可以开始编辑wp-config.php文件啦~
vi /wordpress/wp-config.php
wp-config.php文件全部内容:
<?php
/**
* The base configuration for WordPress
*
* The wp-config.php creation script uses this file during the
* installation. You don't have to use the web site, you can
* copy this file to "wp-config.php" and fill in the values.
*
* This file contains the following configurations:
*
* * MySQL settings
* * Secret keys
* * Database table prefix
* * ABSPATH
*
* @link Editing wp-config.php « WordPress Codex
*
* @package WordPress
*/
// ** 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'
, </