从wp-cli-github页面获取此信息。我已经在这里搜索了几个小时的文档和网站。目前使用Blue Host托管,他们使用的是1.2.0版:(我似乎无法更新。我有3个wp页面,工作“完美”良好,但另一个无法连接到db。
我可以使用与wp config相同的凭据登录到db。php,清理了db,仍然没有运气。
对此有何想法?试图通过wp cli最终更好地维护这些页面。谢谢
wp核心版本:返回良好。
wp config path --debug
Debug (bootstrap): No readable global config found (0.267s)
Debug (bootstrap): No project config found (0.268s)
Debug (bootstrap): ABSPATH defined: /home/public_html/domain/ (0.269s)
Debug (bootstrap): Begin WordPress load (0.269s)
Debug (bootstrap): wp-config.php path: /home/public_html/domain/wp-config.php (0.269s)
Notice: Use of undefined constant DB_USER - assumed \'DB_USER\' in /home/public_html/domain/wp-includes/load.php on line 404
Notice: Use of undefined constant DB_PASSWORD - assumed \'DB_PASSWORD\' in /home/public_html/domain/wp-includes/load.php on line 404
Notice: Use of undefined constant DB_NAME - assumed \'DB_NAME\' in /home/public_html/domain/wp-includes/load.php on line 404
Notice: Use of undefined constant DB_HOST - assumed \'DB_HOST\' in /home/public_html/domain/wp-includes/load.php on line 404
Notice: Undefined variable: table_prefix in /home/public_html/domain/wp-settings.php on line 109
Error: Error establishing a database connection. This either means that the username and password information in your `wp-config.php` file is incorrect or we can’t contact the database server at `DB_HOST`. This could mean your host’s database server is down.
wp配置。php:
<?php
/**
* The base configurations of the WordPress.
*
* This file has the following configurations: MySQL settings, Table Prefix,
* Secret Keys, WordPress Language, and ABSPATH. You can find more information
* by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
* wp-config.php} Codex page. You can get the MySQL settings from your web host.
*
* This file is used by the wp-config.php creation script during the
* installation. You don\'t have to use the web site, you can just copy this file
* to "wp-config.php" and fill in the values.
*
* @package WordPress
*/
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define(\'DB_NAME\', \'dbname\');
/** MySQL database username */
define(\'DB_USER\', \'dbuser\');
/** MySQL database password */
define(\'DB_PASSWORD\', \'pass\');
/** MySQL hostname */
define(\'DB_HOST\', \'localhost\');
/** Database Charset to use in creating database tables. */
define(\'DB_CHARSET\', \'utf8\');
/** The Database Collate type. Don\'t change this if in doubt. */
define(\'DB_COLLATE\', \'\');
/**#@+
* Authentication Unique Keys and Salts.
*
* Change these to different unique phrases!
* You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
* You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
*
* @since 2.6.0
*/
define(\'AUTH_KEY\', \'\');
define(\'SECURE_AUTH_KEY\', \'\');
define(\'LOGGED_IN_KEY\', \'\');
define(\'NONCE_KEY\', \'\');
define(\'AUTH_SALT\', \'\');
define(\'SECURE_AUTH_SALT\', \'\');
define(\'LOGGED_IN_SALT\', \'\');
define(\'NONCE_SALT\', \'\');
/**#@-*/
/**
* WordPress Database Table prefix.
*
* You can have multiple installations in one database if you give each a unique
* prefix. Only numbers, letters, and underscores please!
*/
$table_prefix = \'wps_\';
/**
* WordPress Localized Language, defaults to English.
*
* Change this to localize WordPress. A corresponding MO file for the chosen
* language must be installed to wp-content/languages. For example, install
* de_DE.mo to wp-content/languages and set WPLANG to \'de_DE\' to enable German
* language support.
*/
define(\'WPLANG\', \'\');
/**
* For developers: WordPress debugging mode.
*
* Change this to true to enable the display of notices during development.
* It is strongly recommended that plugin and theme developers use WP_DEBUG
* in their development environments.
*/
define(\'WP_DEBUG\', false);
define( \'AUTOSAVE_INTERVAL\', 300 );
define( \'WP_POST_REVISIONS\', 5 );
define( \'EMPTY_TRASH_DAYS\', 7 );
define( \'WP_CRON_LOCK_TIMEOUT\', 120 );
/* That\'s all, stop editing! Happy blogging. */
/** Absolute path to the WordPress directory. */
if ( !defined(\'ABSPATH\') )
define(\'ABSPATH\', dirname(__FILE__) . \'/\');
/** Sets up WordPress vars and included files. */
require_once(ABSPATH . \'wp-settings.php\');