• 赤色のリンクは、まだ日本語Codexに存在しないページ・画像です。英語版と併せてご覧ください。(詳細

このWikiはいつでも誰でも編集できます

ネットワークの作成

提供: WordPress Codex 日本語版
2010年3月24日 (水) 08:00時点におけるBono (トーク | 投稿記録)による版 (en:User:Andrea/Create A Network 16:47, 21 March 2010 Andrea 版を翻訳用にコピー)

(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)
移動先: 案内検索

このページはラフドラフトで、まだ内容の検証が済んでいません。情報が間違っていたり書き直されることがあります。
執筆中のため、執筆者の許可なく編集しないでください

Create a Network

In WordPress 3.0, you now have the ability to create a network of sites. To enable the Network menu item, you must first define multisite in the wp-config.php file.

Open up wp-config.php and add this line:

define ('WP_ALLOW_MULTISITE', true  ) ;


The Tools, Network Menu

This will enable the Network menu item to appear in the Tools menu.

(screen)

On this screen we will configure certain aspects of our network. You are given the chioce between subdomains or subfolders. This means each additional site in your network will be created as a new virtual subdomain or subfolder. you have to pick one or the other, and you cannot change this unless you reconfigure your install.

Subdomains work by using wildcard subdomains. You must have this enabled in Apache, and you must also add a wildcard subdomain to your DNS records. Some hosts will not support this, so you may need to ask your webhost before enabling this feature.

Subfolders work based on mod_rewrite. If you are using pretty permalinks in your blog already, then subfolder sites will work as well.

Network details are filled in automatically. Double-check they are correct and click the Install button.

You may receive a warning about wildcard subdomains.

"Warning! Wildcard DNS may not be configured correctly!

To use a subdomain configuration, you must have a wildcard entry in your DNS. The installer attempted to contact a random hostname (13cc09.amd64.local) on your domain. This resulted in an error message: name lookup timed out

If you want to host sites in the form of http://site1.example.com then you must add a wildcard record to your DNS records. This usually means adding a * hostname record pointing at your web server in your DNS configuration tool.

You can still use your site but any subdomain you create may not be accessible. If you know your DNS is correct, ignore this message."

Further instructions for enabling wildcard subdomains are available here. {link}

The rest of the steps are ones you must complete in order to finish.

1 First, back up your exisiting wp-config.php and .htaccess files.
2. Create a blogs.dir directory under /wp-content/ 
This directory is used to stored uploaded media for your additional sites and must be writeable by the web server. They should be CHOWNed and CHMODed the same as your wp-content folder.
3. Add the extra lines provided to your wp-config.php file
define( 'MULTISITE', true );
define( 'VHOST', 'yes' );
$base = '/';
define( 'DOMAIN_CURRENT_SITE', 'yourdomain.com' );
define( 'PATH_CURRENT_SITE', '/' );
define( 'SITE_ID_CURRENT_SITE', 1 );
define( 'BLOG_ID_CURRENT_SITE', 1 );
Put these lines right under the wp_allow_multisite line, mostly for readability.
Note: If you are installing in a folder the base and path will contain the folder name.
4. Replace the content of your .htaccess file with the following 

(If there isn;t one, then create it.)

RewriteEngine On
RewriteBase /
# uploaded files
RewriteRule ^(.*/)?files/$ index.php [L]
RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
RewriteRule ^(.*/)?files/(.*) wp-includes/ms-files.php?file=$2 [L]
# add a trailing slash to /wp-admin
RewriteCond %{REQUEST_URI} ^.*/wp-admin$
RewriteRule ^(.+)$ $1/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . - [L]
RewriteRule  ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
5. Once the above steps are completed and the new wp-config.php & .htaccess files are saved, refresh your dashboard.
You will now see a new menu section called Super Admin. The menus contained in there are for adding and managing additional sites in your network. Your base WordPress install is now the main site in your network.

(direct users to other areas, like how to add new blogs etc...)

最新英語版: WordPress Codex » User:Andrea/Create A Network最新版との差分