Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

pt:Criar uma Rede

Tal como no WordPress 3.0, tem a possibilidade de cria uma rede dos sítios, utilizando a funcionalidade multissítios. Este artigo contém instruções para criar uma rede multissítios.

A multisite network can be very similar to your own personal version of WordPress.com. End users of your network can create their own sites on demand, just like end users of WordPress.com can create blogs on demand. If you do not have any need to allow end users to create their own sites on demand, you can create a multisite network in which only you, the administrator, can add new sites.

A multisite network is a collection of sites that all share the same WordPress installation. They can also share plugins and themes. The individual sites in the network are virtual sites in the sense that they do not have their own directories on your server, although they do have separate directories for media uploads within the shared installation, and they do have separate tables in the database.

NOTE: If you are currently running WordPress MU, you do not need to complete these steps. Your network is already enabled. Once you upgrade to the 3.x branch, you will be prompted to update your .htaccess rules for MultiSite. As of the release of WordPress 3.1, you will need to upgrade WPMU manually. You can no longer use the auto-upgrade tool to move from WPMU to Multisite.
NOTE: Upgraded and can't find the Network Admin menu?


Passo 0: Antes de Começar

Compared with a typical single WordPress installation a network installation has additional considerations. You must decide if you want to use subdomains or subfolders and how you want to manage them. Installing themes and plugins is different: for example, each individual site of a network can activate both, but install neither.

This guide describes how to install manually WordPress Multisite in your current WordPress installation. There are also available ready-to-run packages from BitNami.

Please read Before You Create A Network in full before continuing.

Passo 1: Preparar o Seu WordPress

Your existing WordPress site will be updated when creating a network. Unless this is a fresh install and you have nothing to lose, please backup your database and files.

Verify that Pretty Permalinks work on your single WP instance.

Also deactivate all active plugins. You can reactivate them again after the network is created.

If you plan to run WordPress out of its own directory, do that before activating Multisite.

Passo 2: Permitir Multissítios

To enable the Network Setup menu item, you must first define multisite in the wp-config.php file.

Open up wp-config.php and add this line above where it says /* That's all, stop editing! Happy blogging. */. If it doesn't say that anywhere, then add the line somewhere above the first line that begins with require or include:

/* Multissítios */
define( 'WP_ALLOW_MULTISITE', true );

Vai ter de reiniciar o seu navegador para continuar.

Passo 3: Instalação de uma Rede

The previous step enables the Network Setup item in your Tools menu. Use that menu item to go to the Create a Network of WordPress Sites screen.

Tools Network Screen

To see an example of the Create a Network of WordPress Sites screen, look at Administration > Tools > Network Setup. The screen does not look exactly the same in all circumstances. The example shown is for an installation on localhost, which restricts the options available.

Endereços dos Sítios na sua Rede

You are given the choice between sub-domains and sub-directories, except when existing settings restrict your choice.

You must choose one or the other. You can reconfigure your network to use the other choice after installation, despite the advice on the screen, but reconfiguring it might not be easy.

You only need wildcard DNS for on-demand domain-based sites, despite the advice that may be on the screen.

Once more: See Before You Create A Network.

  • Sub-domains — a domain-based network in which on-demand sites use subdomains
  • Sub-directories — a path-based network in which on-demand sites use paths

Detalhes da Rede

These are filled in automatically, but you can make changes.

Server Address
The domain of the URL you are using to access your WordPress installation.
Network Title
The title of your network as a whole.
Admin E-mail Address
Your email address as super admin of the network as a whole.

Double-check the details and press the Install button.

Nota: The installer may perform a check for wildcard subdomains when you have not configured them yet, or when you do not need them at all. Ignore the warning if it does not apply to your network. See the Server Requirements section in Before You Create A Network for information about wildcard subdomains.

Passo 4: Ativação da Rede

Tools Network Created

To enable your network, follow the instructions on the Create a Network of WordPress Sites screen. The instructions that you see are customized for your installation. They might not be the same as the examples you see here.

Back up your existing wp-config.php and .htaccess files, unless this is a fresh install and you have nothing to lose.

Existem dois passos:

1. Add the specified lines to your wp-config.php file
The extra lines go just after where you added the line in Step 1: Prepare Your WordPress.
2. Add the specified lines to your .htaccess file
If you do not have a .htaccess file, then create it in the same directory as your wp-config.php file.
If you ALREADY have a .htaccess file, replace any existing WP lines with these new ones.
In some cases you might also have to add Options FollowSymlinks at the start of the file.

After completing these steps, log in again using the link provided. You might have to clear your browser's cache and cookies in order to log in.

Passo 5: Definições de Administrador da Rede

Network Admin

At the left of your WordPress toolbar, My Sites is now the second item. There, all your sites are listed, with handy fly-out menus, as well as a Network Admin menu item. Under Network Admin you can use the Dashboard item to go to the Network Dashboard screen.

Vá para o Ecrã de Definições para configurar as opções de rede, e o Ecrã de SSítios para gerir os seus sítios.

Para mais informação, consulte: Network Admin

? Atualizou e não consegue encontrar o menu Administrador de Rede?

Passo 6: Administração

There are some additional things you might need to know about advanced administration of the network, due to the additional complexity of a Multisite. Even if you're familiar with WordPress, the location and behavior of Multisite Network Administration can be confusing.

Leia Administração de Rede Multissítios para mais informação.

Para ajuda na resolução de problemas:

Artigos Relacionados