WordPress:Installing Multiple Blogs

来自站长百科
Fludlen讨论 | 贡献2008年8月20日 (三) 10:09的版本
跳转至: 导航、​ 搜索

Multiple Blogs Through Multiple Installs

通过多次安装,安装多个博客

If you want multiple blogs using WordPress, you must actually install each separately (that is, as a separate WordPress installation). You can do this whether you have the ability to create multiple databases or are limited to a single database.

如果你想要使用多个WordPress博客,你必须能够分别地安装每个博客(就是,分开安装每个博客)。你有能力创建多个数据库或者限制于一个单一的数据库的时候,都可以创建多个WordPress博客。

Multiple Databases

多个数据库

You'll need a separate MySQL database for each blog you plan to install. If you have not yet created these, basic instructions are found here.

你需要为计划安装的每个博客,创建单独的MySQL 数据库。如果你还没有创建这些数据库,这里有基本的指导

The wp-config.php file will vary for each installation. The lines to change are:

每次安装的时候,wp-config.php文件都会发生变化。需要更改的行是:

define('DB_NAME', 'wordpress');     // The name of the database
define('DB_USER', 'username');     // Your MySQL username
define('DB_PASSWORD', 'password'); // ...and password

define('DB_NAME', 'wordpress'); // 数据库名

define('DB_USER', 'username');     // 你的 MySQL 用户名
define('DB_PASSWORD', 'password'); // ...和密码

DB_NAME will be the name of the individual database created for that blog. If you are using different user logins for each database, edit DB_USER and DB_PASSWORD to reflect this, as well.

DB_NAME是为每个博客创建的单独的数据库的名称。如果不同的用户登录不同的数据库,请编辑DB_USERDB_PASSWORD反映这一点。

Upload each wp-config.php file to its specific root/installation directory, and run the installation. See WordPress:Installing WordPress for more information.

将每个wp-config.php文件,上传到各自的根/安装目录,并且运行安装。更多的信息,请看看安装WordPress

Single Database

单个的数据库

As with the multiple databases solution described above, the wp-config.php file will vary for each installation. In this case, however, only a single line will be unique to each blog:

如上所述的多个博客有多个数据库,每次安装,wp-config.php文件都不同。然而,在这个例子中,每个博客中只有一行是唯一的:

$table_prefix = 'wp_'; // example: 'wp_' or 'b2' or 'mylogin_' 

$table_prefix = 'wp_'; // example: 'wp_' or 'b2' or 'mylogin_'

By default, WordPress assigns the table prefix wp_ to its MySQL database tables, but this prefix can be anything you choose. By using more than one, you create unique identifiers for each blog in your database. For example, let's say you have three blogs to set up, with the names Main, Projects and Test. You want to substitute the prefix wp_ for each blog's wp-config.php:

默认情况下,WordPress将表格前缀wp_附加到MySQL 数据库表格中,但是这个前缀可以是你选择的任何内容。通过使用多个前缀,你可以为数据库中的每个博客创建唯一的标示符号。例如,假如你要创建三个博客,博客名分别是Main,Projects和Test。你给每个博客的wp-config.php添加了前缀wp_

Main blog:

$table_prefix = 'main_'; 

Projects blog:

$table_prefix = 'projects_'; 

Test blog:

$table_prefix = 'test_'; 

Main 博客:

$table_prefix = 'main_'; 

Projects 博客:

$table_prefix = 'projects_'; 

Test 博客:

$table_prefix = 'test_'; 

As noted, you may use a prefix of your own making. Those provided here are for example purposes only.

如上所述,你可以自己创造前缀。这里使用的前缀,只是用于举例。

Upload each wp-config.php file to its specific root/installation directory, and run the installation. See WordPress:Installing WordPress for more information.

将每个wp-config.php文件上传到特别的根/安装目录中,并且运行安装。更多的信息,请看看安装WordPress

Multiple Install Automation

自动安装多个博客

WordPress user Stephanie Booth provides instructions on automating the installation of multiple blogs for a weblog farm in her posting, Scripts for a WordPress Weblog Farm. In Musings on a Multiblog WordPress, Stephanie shares her thoughts on the process.

WordPress 用户 Stephanie Booth在她发表的帖子WordPress 网络日志 Farm脚本中,提供了自动安装多个博客的说明。在[1],Stephanie分享了她的想法。

  • 你应该看看http://climbtothestars.org/play/wordpress.sh.txt --正在进展的工作。

Alternative WordPress Projects

其它的 WordPress Projects

Alternative projects and plugins which provide some level of multi-blogging facility.

其它的projects和插件,使得写多个博客,变得更加便利。

Lyceum

Lyceum

Developed by ibiblio.org, Lyceum is a stand-alone multi-user multi-blogging application designed to handle 2 to 2,000,000 blogs.

由ibiblio.org开发,Lyceum是个单独的,多用户,多个博客软件程序,能够处理2到2,000,000博客。

Utilizing the WordPress blogging engine at its core, Lyceum enables stand-alone, multi-user multi-blog services for small and high-volume environments. At its core, Lyceum is a minimally-featured enhancement to WordPress.

在核心,使用WordPress博客引擎,Lyceum能够在小环境,高流量的情况下,使用单独的,多用户,多博客的服务。Lyceum核心是WordPress最低限度的提升。

Lyceum lets WordPress do what it does well; we simply added nice things like smart administrative controls, an easy-to-use installer, enterprise-oriented database architecture, support for load-balancing, all the while focusing on flexibility, security and usability.

Lyceum使得WordPress执行最好的操作;我们只要添加一些较好的内容,如好的管理工具,便于使用的安装器,符合需求的数据库结构,负载平衡支持,同时突出灵活性,安全性和可用性。

Lyceum is GPL-licensed, under active development, and free to use. Lyceum currently powers sites like iblog.co.za, TeachFor.Us (Teach For America teachers' blogs), BodyBlogs and the Hopkins Blogs.

Lyceum受到通用公共许可证的许可,目前正在积极发展,而且可以免费使用。Lyceum当前推动了iblog.co.za, TeachFor.Us站点(Teach表示美国来说的博客),BodyBlogsHopkins 博客

WordPress:WordPress MU

WordPress MU

WordPress MU is an official branch of WordPress that is designed for managing and hosting thousands of blogs instead of just one.

WordPress MU是官方WordPress站点支部站点,用来管理和托管成千上万个博客而不是单个的博客站点。

WordPress MU is ideal for applications like blog networks and newspapers looking to manage multiple blogs from a single installation, enterprise users looking for a large scale blogging solution for intranet deployments, schools and universities who want to offer blogs to all their students and teachers, or individuals looking to host multiple blogs for their families or friends.

WordPress MU是非常理想的博客网络和报纸的应用软件,只要安装一次,就可以管理多个博客,企业可以使用这个软件为各部分安装博客,学校和大学可以向学生和老师提升这样的博客,个人如果想要为家人或者朋友托管博客,也可以使用这样的软件。

Like single-user WordPress, WordPress MU is available for free under the GPL open source license.

就如单一用户使用的WordPress那样,WordPress也是免费的,可以在GPL 开放源码许可获取。

Example MU installations include:

MU安装的例子包括:




Virtual Multiblog

Virtual 多个博客

Stephen Rider's system that uses a modified config file to call different blogs based on directory or domain.

Stephen Rider的系统,使用已更改的配置文件,根据目录或者域,调用不同的博客。

Virtual Multiblog allows for easy upgrades of WordPress, as the only changed file in the entire install is wp-config.php (everything else is within a new folder in wp-content). It also is pretty "future proof", unless WordPress makes radical changes to wp-config.php.

Virtual Multiblog能够轻易地升级WordPress,因此整个WordPress中唯一更改的文件是wp-config.php(其它所有内容都在wp-content中的一个新的文件夹中)。这也是"future proof",除非WordPress对wp-config.php做了大量的更改。

This system is based on Allan Mertner's original symbolic link hack.

这个系统是以Allan Mertner的最初的symbolic link hack为基础。

MultiSite

MultiSite

Ruben's attempt at a WordPress Multiblog Ruben尝试多个WordPress博客。

Multi Blog

多个博客

The project of a small group of WordPress users.

一小群WordPress用户的项目。

Multi Blog Hack

多个博客 Hack

Another multiple blog hack for WordPress. One installation, each user has his own theme, blogname, description, links, etc.

WordPress另一个多个博客hack。安装一次,每个用户都会有自己的主题,博客名,描述,链接, 等等。

WP-Create and WP-Mass-Upgrade

WP-CreateWP-Mass-Upgrade

A pair of shell scripts for web hosting administrators who manage a lot of scattered WordPress installations in different directory locations, owned by different users. The goal is to have all WordPress installations checked out and managed via subversion.

网络管理员的一对shell脚本,网络管理员管理不同用户在不同目录上安装的WordPress。目的就是通过子版本,核查并且管理所有的WordPress。

WP-Create is a super-fast way to set up a database and db user, check out WP via svn, create the wp-config file, and set permissions on the installations. It also generates an array line for use with WP-Mass-Upgrade.

WP-Create是一种非常快的方式,用来创建数据库和db用户,通过svn查看WP,为安装的WordPress设置权限,同时也为WP-Mass-Upgrade创建array line。

WP-Mass-Upgrade contains an array of all WP installations on a server - their paths, URLs, owners, and emails. When new WP versions are released, this script will upgrade all installations in the array quickly, and send email to all of the clients letting them know their sites have been upgraded. Designed to be used in conjunction with WP-Create.

WP-Mass-Upgrade在服务器上包含了一组所有安装好的WP-路径,URLs,用户和电子邮件。当发行了新的WP版本的时候,这个脚本会快速地升级array中的所有安装,并且向所有的客户发送电子邮件,通知他们,他们的站点已经升级了。和WP-Create一起使用。

These scripts are optimized for WHM/cPanel systems, but with slight modifications should work for Plesk and other systems as well.

脚本对WHM/cPanel系统而言是最优化的,但是只需稍作更改,也能够在Plesk和其它的系统中运行。

vhost plugin

vhost 插件

This plugin maps a virtual host to a single WordPress category, supporting fully independent themes. Additionally, users can be restricted by the blog admin to post in only one category (and thus only one vhost):

插件将一个虚拟主机映射到单一的WordPress类别中,支持完全独立的主题。此外,博客管理员会限制用户只能够在一个类别上发表文章(因此只有一个vhost):

Multiply

Multiply

Multiply is a plugin for WordPress 1.5.x which allows multiple blogs -- or, in the pretentious terminology I have adopted, "presses" -- from within the one administration interface.

Multiply是WordPress1.5版本的插件,允许运行多个博客—或者使用我采用的术语,"presses" –在一个管理界面内。