最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

php - How to use Multi SQL Database in Wordpress?

programmeradmin0浏览0评论

It is my wp-config.php of Wordpress site.

<?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 .php
 *
 * @package WordPress
 */

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'bd_1');

/** MySQL database username */
define('DB_USER', 'bd_1');

/** MySQL database password */
define('DB_PASSWORD', 'mysitepass');

/** MySQL hostname */
define('DB_HOST', 'localhost');

/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8mb4');

/** 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 .1/salt/ WordPress 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',         '~+w/~cC@PI11/a5`xgC9N-e%|~CK2{^-`y?Ovl^8:2b~7hvZLXIw[Ux3g7`<uokK');
define('SECURE_AUTH_KEY',  '^(?`vq-zMnu-~+7Z?kAjYGcLs5O8>ftEZ9H2b#9W^nX)YM^-n_CH$B|~LP3&v-q1');
define('LOGGED_IN_KEY',    'i4D]=Pzjkk_FSD$;|db%O<lM*KxB +4=Ny$%r1|]qC61q|t/<?Pbs~.O0_7&]}?M');
define('NONCE_KEY',        'fN74@4Zr{_QMio27b`M4V&f/B+W3A`X$U#t_~zVk6{c>~:Nij %f.a4I0VC>7&2a');
define('AUTH_SALT',        'IAsw4BOY8i]oP%JTpE9jrtY>[]H{p4<dp_c,9&G(do~O7EF]~L!pV`l,!e*X}<+<');
define('SECURE_AUTH_SALT', 'dd6!djBuGsjFU fZ)wSY+dpQV4l9FMVx7qaYue^GRn=DK!|J|tw],6D?p qD62>p');
define('LOGGED_IN_SALT',   '{iuPzO-# Zf$8N{EWmL.nck=*?bp(GQF-dmfvp{ii9y4AVJkQ(#Df+RV8[/K*kdt');
define('NONCE_SALT',       '}K0^aDCmr%1L)zls6}#8q+YVHp?A$><I_!l~%XV5]oa@I2vo^*]+LFAyL<x:hZla');

/**#@-*/

/**
 * 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  = 'wp_';

/**
 * 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.
 *
 * For information on other constants that can be used for debugging,
 * visit the Codex.
 *
 * @link 
 */


/* 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');

Now Tell me or replace following codes multi Database sql setup with read and write rules.

I want to connect her multi sql database under remote sql, Because my database is too big.

Anyone help?

发布评论

评论列表(0)

  1. 暂无评论