March 29th, 2007
如果你的空间服务商只提供一个mysql数据库,但是还想装两个甚至更多个wordpress?
如果出于经济考虑,你想和朋友共用一个mysql数据库,而建立不同的wordpress?
如果你在A公司买的php空间,在B公司买的mysql,如果搭建起wordpress?
今天在研究wordpress时,发现上面问题都可以在wp-config.php中圆满解决。
< ?php
// ** MySQL settings ** //
define('DB_NAME', 'wordpress'); // The name of the database
define('DB_USER', 'username'); // Your MySQL username
define('DB_PASSWORD', 'password'); // ...and password
define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value
// You can have multiple installations in one database if you give each a unique prefix
$table_prefix = 'wp_'; // Only numbers, letters, and underscores please!
// Change this to localize WordPress. A corresponding MO file for the
// chosen language must be installed to wp-includes/languages.
// For example, install de.mo to wp-includes/languages and set WPLANG to 'de'
// to enable German language support.
define ('WPLANG', '');
/* That's all, stop editing! Happy blogging. */
define('ABSPATH', dirname(__FILE__).'/');
require_once(ABSPATH.'wp-settings.php');
?>
Read the rest of this entry »
Tags: mysql, Wordpress
Posted in Web Develop, Wordpress, 技术 | Info&Tech | 4 Comments »