Chapter 13

Hosting Multiple Sites with WordPress

IN THIS CHAPTER

check Deciding whether multiple sites are for you

check Exploring web-hosting considerations

check Enabling the WordPress Network capabilities

check Administering and managing a network

check Diverting spammers and sploggers

In this chapter, I introduce you to the network feature that’s built into the WordPress software. The network feature allows you, the site owner, to add and maintain multiple blogs within one installation of WordPress. In this chapter, you discover how to set up the WordPress network feature, explore settings and configurations, gain an understanding of the Network Administrator role, determine which configuration is right for you (do you want subdirectories or subdomains?), and find some great resources to help you on your way.

With the network features enabled, users of your network can run their own sites within your installation of WordPress. They also have access to their own Dashboards with the same options and features covered in the first 12 chapters of this book. Heck, it would probably be a great idea to buy a copy of this book for every member of your network so that everyone can become familiar with the WordPress Dashboard and features, too. At least have a copy on hand so people can borrow yours!

Deciding When to Use the Multisite Feature

Usually, for multiple users to post to one site, the default WordPress setup is sufficient. The Multi part of the WordPress Multisite feature’s name doesn’t refer to how many users were added to your WordPress website; it refers to the ability to run multiple sites in one installation of the WordPress software. Multisite is a bit of a misnomer and an inaccurate depiction of what the software actually does. Network of sites is a much closer description.

Determining whether to use the Multisite feature depends on user access and publishing activity. Each site on the network shares a codebase and users but is a self-contained unit. Users still have to access the back end of each site to manage options or post to that site. A limited number of general options are available networkwide, and posting isn’t one of those options.

You can use multiple sites on a network to give the appearance that only one site exists. Put the same theme on each site, and the visitor doesn’t realize that the sites are separate. This technique is a good way to separate sections of a magazine site, using editors for complete sections (sites) but not letting them access other parts of the network or the back ends of other sites.

Another factor to consider is how comfortable you are with editing files directly on the server. Setting up the network involves accessing the server directly, and ongoing maintenance and support for your users often leads to the network owner’s doing the necessary maintenance, which is not for the faint of heart.

Generally, you should use a network of sites in the following cases:

  • You want multiple sites and one installation. You’re a blogger or site owner who wants to maintain another site, possibly with a subdomain or a separate domain, with both sites on one web host. You’re comfortable with editing files; you want to work with one codebase to make site maintenance easier; and most of your plugins and themes are accessible to all the sites. You can have one login across the sites and manage each site individually.
  • You want to host blogs or sites for others. This process is a little more involved. You want to set up a network in which users sign up for their own sites or blogs below (or on) your main site and you maintain the technical aspects.

Because all files are shared, some aspects are locked down for security purposes. One of the most puzzling security measures for new users is suppression of errors. Most PHP errors (such as those that occur when you install a faulty plugin or incorrectly edit a file) don’t output messages to the screen. Instead, WordPress displays what I like to call the White Screen of Death.

Finding and using error logs and doing general debugging are necessary skills for managing your own network. Even if your web host sets up the ongoing daily or weekly tasks for you, managing a network can involve a steep learning curve.

remember When you enable the Multisite feature, the existing WordPress site becomes the main site in the installation.

Although WordPress can be quite powerful, in the following situations, managing multiple sites has limitations:

  • One web account is used for the installation. You can’t use multiple hosting accounts.
  • You want to post to multiple blogs at the same time. WordPress doesn’t allow this practice by default.
  • If you choose subdirectory sites, the main site regenerates permalinks with /blog/ in them to prevent collisions with subsites. Plugins are available that prevent this regeneration.

The best example of a large blog network with millions of blogs and users is the hosted service at WordPress.com (https://wordpress.com). At WordPress.com, people are invited to sign up for an account and start a blog by using the Multisite feature within the WordPress platform on the WordPress server. When you enable this feature on your own domain and enable the user registration feature, you’re inviting users to do the following:

  • Create an account
  • Create a blog in their WordPress installations (on your domain)
  • Create content by publishing blog posts
  • Upload media files such as photos, audio, and video
  • Invite friends to view their blogs or sign up for their own accounts

Understanding the Difference between Sites and Blogs

Each additional blog in a WordPress Multisite network is a site instead of a blog. What’s the difference?

Largely, the difference is one of perception. Everything functions the same way, but people see greater possibilities when they no longer think of each site as being “just” a blog. WordPress can be much more:

Considering Web-Hosting Services

This chapter assumes that you already have the WordPress software installed and running correctly on your web server, and that your web server meets the minimum requirements to run WordPress (see Chapter 2).

Before you enable the WordPress network feature, you need to determine how you’re going to use the feature. You have a couple of options:

If you’re planning to run just a few of your own sites with the WordPress network feature, your current hosting situation is probably well suited to the task. (See Chapter 3 for information on web-hosting services.) If, however, your plan is to host a large network with hundreds of blogs and multiple users, you should consider contacting your host and increasing your bandwidth, as well as the disk-space limitations on your account.

warning In addition to the necessary security measures, time, and administrative tasks that go into running a community of websites, you’ve got a few things to worry about. Creating a community will increase the resource use, bandwidth, and disk space on your web server. In many cases, if you go over the limits given to you by your web host, you’ll incur great cost. Make sure that you anticipate your bandwidth and disk-space needs before running a large network on your website. (Don’t say I didn’t warn you!)

Many WordPress Multisite communities start with grand dreams of being large, active communities. Be realistic about how your community will operate so that you can make the right hosting choice for yourself and your community.

Small multisite communities can be easily handled via a shared-server solution, whereas larger, more active communities really need a dedicated-server solution for operation. The difference between the two lies in their names:

A dedicated-server solution is a more expensive investment for your blog community, whereas a shared-server solution is more economical. Your decision about which solution to go with for your WordPress Network blogging community should be based on your realistic estimates of how big and how active your community will be. You can move from a shared-server solution to a dedicated-server solution if your community gets larger than you expected, but it’s easier to start with the right solution for your community from day one.

Enabling the WordPress Network Feature

WordPress makes it pretty easy to enable the network feature, but doing so does require opening a file on your web server called wp-config.php and making a small alteration. Follow these steps to get the process started:

  1. Download the file called wp-config.php from the WordPress installation on your web server.

    It’s easiest to use an SFTP program to download a copy of this file from your web server to your computer. (Chapter 3 provides the information you need about using SFTP.)

  2. Using your preferred text editor, open the wp-config.php file.

    Windows users can use Notepad to edit the file; Mac users can use TextEdit.

  3. Click at the end of the line that reads define( 'DB_COLLATE', '' ); and then press Enter to create a new blank line.
  4. Type the following on the new blank line:

    define ( 'WP_ALLOW_MULTISITE', true );

  5. Save the file to your computer as wp-config.php.
  6. Upload the new file to your web server in your WordPress installation directory.
  7. Go to your WordPress Dashboard in your browser.

    You see a new item, labeled Network Setup, on the Tools menu.

  8. Click the Network Setup link on the Tools menu.

    A page called Create a Network of WordPress Sites loads in your browser window, as shown in Figure 13-1.

image

FIGURE 13-1: The Create a Network of WordPress Sites page in your WordPress Dashboard.

warning If you have any plugins installed and activated on your WordPress installation, deactivate them before you proceed with the network setup. WordPress won’t allow you to continue until you deactivate all your plugins.

Before proceeding with the final steps in enabling the WordPress network feature, you need to get the items in the next section in order on your web server. You also need to decide how to handle the multiple sites within your network. These configurations need to be in place so that you can run the WordPress network successfully. If you can perform the configurations in this section yourself (and if you have access to the Apache configuration files), this section is for you. If you don’t know how, are uncomfortable with adjusting these settings, or don’t have access to change the configurations in your web server software, ask your hosting provider for help, or hire a consultant to perform the configurations for you. You can hire a local consultant or one who can work with you remotely. You can find a list of consultants on the Code Poet website at http://directory.codepoet.com.

DNS

The WordPress network feature gives you two ways to run a network of sites on your domain with one installation of WordPress: the subdomain option and the subdirectory option. The most popular option (and recommended structure) sets up subdomains for the sites created by your WordPress network. When you choose the subdomain option, the username of the blog appears first, followed by your domain name. When you choose the subdirectory option, your domain name appears first, followed by the username of the blog.

You can see the difference in the URLs of these two options by comparing the following examples:

  • A subdomain looks like this: http://username.yourdomain.com.
  • A subdirectory looks like this: http://yourdomain.com/username.

If you want to use a subdomain for each site on your WordPress network, you must add a wildcard record to your domain name server (DNS) records. You need to add a hostname record pointing to your web server in the DNS configuration tool available in your web-server administration software (such as WebHost Manager, a popular web-host administration tool). The hostname record looks like this: *.yourdomain.com (where yourdomain.com is replaced by your actual domain name).

Apache mod_rewrite

Apache (https://www.apache.org/free) is web-server software that’s loaded and running on your web server. Not everyone has access to Apache files, however. Usually, the only person who has access to those files is the web-server administrator (which usually is your web host). Depending on your own web server account and configuration, you may not have access to the Apache software files.

The Apache module you need to create nice permalink URLs (see Chapter 5 for information on pretty permalinks) for your WordPress network is called mod_rewrite. This module must be configured so that it’s active and installed on your server.

You (or your web host) can make sure that the Apache mod_rewrite module is activated on your server. To do so, open the httpd.conf file, and verify that it includes the following line:

LoadModule rewrite_module /libexec/mod_rewrite.so

If not, type that line on its own line, and save the file. You’ll probably need to restart Apache to make the change take effect.

Virtual host

In the same httpd.conf file that I discuss in the preceding section (“Apache mod_rewrite”), you need to make some adjustments in the <VirtualHost> section of that file. Follow these steps:

  1. Find the <VirtualHost> section in the httpd.conf file.

    This line of the httpd.conf file provides directives, or configurations, that apply to your website.

  2. Find a line in the <VirtualHost> section of the httpd.conf that looks like this:

    AllowOverride None

  3. Replace that line with this line:

    AllowOverride FileInfo Options

  4. On a new line, type ServerAlias *.yourdomain.com.

    Replace yourdomain.com with whatever your domain is. This line defines the host name for your network site and is essential for the virtual host to work correctly.

  5. Save the httpd.conf file, and close it.

PHP

In this section, you edit the PHP configuration on your web server. PHP needs to have the following configurations in place in the php.ini file on your web server to run WordPress Multisite on your server:

  • Set your PHP to not display any error messages in the visitor’s browser window. (Usually, this setting is turned off by default; just double-check to be sure.)
  • Find out whether your PHP is compiled with memory limit checks. You can find out by looking for the text memory_limit in the php.ini file. Usually, the default limit is 8MB. Increase the memory limit to at least 32MB, or even 64MB, to prevent PHP memory errors when running WordPress Multisite.

Installing the Network on Your Site

The Network Details section of the Create a Network of WordPress Sites page (refer to Figure 13-1 earlier in this chapter) has options that are filled in automatically. The server address, for example, is pulled from your installation and can’t be edited. The network title and administrator email address are pulled from your installation database, too, because your initial WordPress site is the main site on the network.

Follow these steps to complete the installation (and be sure to have your preferred text-editor program handy):

  1. Click the Install button at the bottom of the Create a Network of WordPress Sites page of your WordPress Dashboard.

    The Enabling the Network page opens.

  2. Add the required network-related configuration lines to the wp-config.php file following the define ( 'WP_ALLOW_MULTISITE', true ); you added earlier.

    On the Enabling the Network page, WordPress gives you up to six lines of configuration rules that need to be added to the wp-config.php file. The lines of code you add may look like this:

    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', false);
    define('DOMAIN_CURRENT_SITE', domain.com);
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);

    These lines of code provide configuration settings for WordPress by telling WordPress whether it’s using subdomains, what the base URL of your website is, and what your site’s current path is. This code also assigns a unique ID of 1 to your website and blog for the main installation site of your WordPress Multisite network.

    warning The lines of code that appear on the Enabling the Network page are unique to your installation of WordPress. Make sure that you copy the lines of code that are given to you on the Create a Network of WordPress Sites page on your installation because they are specific to your site’s setup.

    By default, WordPress sets up your network to use subdirectories instead of subdomains. If you’d like to use subdomains, change define('SUBDOMAIN_INSTALL', false); to define('SUBDOMAIN_INSTALL', true);. Make sure that you have the <VirtualHost> and Apache mod_rewrite configurations on your server in place before you do this; I cover both configurations earlier in this chapter.

  3. Add the necessary rewrite rules to the .htaccess file on your web server.

    WordPress gives you several lines of code that you need to add to a file called .htaccess on your web server. (You find that file in the WordPress installation directory.) These lines look something like this:

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [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]

    remember Earlier in this chapter, I discuss the required Apache module mod_rewrite, which you must have installed on your web server to run WordPress Multisite. The rules that you add to the .htaccess file on your web server are mod_rewrite rules, and they need to be in place so that your web server tells WordPress how to handle things like permalinks for blog posts, pages, media, and other uploaded files. If these rules aren’t in place, the WordPress multisite feature won’t work correctly.

  4. Copy the lines of code that you entered in Step 3, open the .htaccess file, and paste the code there.

    Completely replace the rules that already exist in that file.

  5. Save the .htaccess file, and upload it to your web server again.
  6. Return to your WordPress Dashboard, and click the Log In link at the bottom of the Enabling the Network page.

    You’re logged out of WordPress because by following these steps, you changed some of the browser cookie-handling rules in the wp-config.php and .htaccess files.

  7. Log in to WordPress by entering your username and password in the login form.

Exploring the Network Admin Dashboard Menu

When the Multisite feature enabled, you see the link to My Sites — if you hover your mouse pointer over that link, the Network Admin link displays in the drop-down menu on the upper-left side of the Dashboard, as shown in Figure 13-2.

image

FIGURE 13-2: Link to the Network Admin Dashboard.

WordPress has separated the Network Admin menu features from the regular (Site Admin) Dashboard menu features to make it easier for you to know which part of your site you’re managing. If you’re performing actions that maintain your main website — publishing posts or pages, creating or editing categories, and so on — you work in the regular Dashboard (Site Admin). If you’re managing any of the network sites, plugins, and themes for the network sites or registered users, you work in the Network Admin section of the Dashboard.

remember Keep in mind the distinct differences between the Site Admin and Network Admin Dashboards, as well as their menu features. WordPress does its best to know which features you’re attempting to work with, but if you find yourself getting lost on the Dashboard, or if you’re not finding a menu or feature that you’re used to seeing, make sure that you’re working in the correct section of the Dashboard.

The Network Admin Dashboard (see Figure 13-3) is similar to the regular WordPress Dashboard, but as you may notice, the modules pertain to the network of sites. Options include creating a site, creating a user, and searching existing sites and users. Obviously, you won’t perform this search if you don’t have any users or sites yet. This function is extremely useful when you have a community of users and sites within your network, however.

image

FIGURE 13-3: The Network Admin Dashboard.

tip The Network Admin Dashboard is configurable, just as the regular Dashboard is, and you can move the modules around and edit the settings of the modules. See Chapter 4 for more information about arranging the Dashboard modules to suit your taste.

The Search Users feature allows you to search usernames and users’ email addresses. If you search for the user Lisa, for example, your results include any user whose username or email address contains Lisa, so you can receive multiple returns from just one search word or phrase. The Search Sites feature returns any sites within your network that match the terms you’ve searched for.

The Network Admin Dashboard has two useful links near the top-left corner:

Additionally, the WordPress Network Admin Dashboard gives you a real-time count of how many sites and users you have on your network, which is nice-to-know information for any network administrator.

Managing Your Network

As I mention earlier in this chapter, the Network Admin Dashboard has its own set of menus, separate from those of the Site Admin Dashboard. Those menus are located on the left side of the Network Admin Dashboard. This section goes through the menu items, providing explanations; instructions on working with the settings; and configurations to help you manage your network, sites, and users.

These menus are available on the Network Admin Dashboard:

All the items on the Network Admin Dashboard are important, and you’ll use them frequently throughout the life of your network. Normally, I’d take you through the menu items in order so that you can follow along on your Dashboard, but it’s important to perform some preliminary configurations on your network. Therefore, I start the following sections with the Settings menu; then I take you through the other menu items in order of their appearance on the Network Admin Dashboard.

Settings

Click the Settings menu link on the Network Admin Dashboard. The Network Settings screen appears (see Figure 13-4), displaying several sections of options for you to configure to set up your network the way you want.

image

FIGURE 13-4: The Network Settings screen.

Operational Settings

The Operational Settings section has these settings:

  • Network Title: This setting is the title of your overall network of sites. This name is included in all communications regarding your network, including emails that new users receive when they register a new site within your network. Type your desired network title in the text box.
  • Network Admin Email: This setting is the email address that all correspondence from your website is addressed from, including all registration and signup emails that new users receive when they register a new site and/or user account within your network. In the text box, type the email that you want to use for these purposes.

Registration Settings

The Registration Settings section allows you to control several aspects of allowing users to sign up on your network. The most important option is whether to allow open registration.

To set one of the following options, select its radio button:

  • Registration Is Disabled: Disallows new user registration completely. When selected, this option prevents people who visit your site from registering for a user account.
  • User Accounts May Be Registered: Allows people to create only user accounts, not create blogs on your network.
  • Logged In Users May Register New Sites: Allows only existing users (those who are logged in) to create a new blog on your network. This setting also disables new user registration. You’d choose this option if you didn’t want just anyone registering for an account. Instead, you, as the site administrator, can add new users at your discretion.
  • Both Sites and User Accounts Can Be Registered: Allows users to register an account and a site on your network during the registration process.

These options apply only to outside users. As a network admin, you can create new sites and users any time you want by setting the necessary options on the Network Admin Dashboard. (For information about creating users, see the upcoming “Users” section.)

The remaining options in the Registration Settings section are as follows:

  • Registration Notification: When this option is selected, an email is sent to the network administrator every time a user or a site is created on the system, even if the network administrator is the person who created the site.
  • Add New Users: When this option is selected, your community blog owners (individual site administrators) can add new users to their own community blogs via the Users page of their individual Dashboards.
  • Banned Names: By default, WordPress bans several usernames from being registered within your community, including www, web, root, admin, main, invite, and administrator. This ban is for good reason: You don’t want a random user to register a username such as admin, because you don’t want that person misrepresenting himself as an administrator of your site. You can enter an unlimited amount of usernames in the Banned Names text box.
  • Limited Email Registrations: You can limit signups based on email domains by filling in this text box, entering one email domain per line. If you have open registrations but limited email addresses, only the people who have email domains that are in the list can register. This option is an excellent one to use in a school or corporate environment where you’re providing email addresses and sites to students or employees.
  • Banned Email Domains: This feature, which is the reverse of Limited Email Registration, blocks all signups from a particular domain and can be useful in stopping spammers. You can enter gmail.com in the text box, for example, to ban anyone who tries to sign up with a Gmail address.

New Site Settings

The New Site Settings section (see Figure 13-5) is a configurable list of items that WordPress populates with default values when a new site is created. These values include the ones that appear in welcome emails, on a user’s first post page, and on a new site’s first page.

image

FIGURE 13-5: New Site Settings section of the Network Settings page.

The configurable list of items includes:

  • Welcome Email: This setting is the text of the email that owners of newly registered sites on your network receive when their registration is complete. You can leave the default message in place, if you like, or you can type the text of the email you want new site owners to receive when they register a new site within your network.

    A few variables you can use in this email aren’t explained entirely on the Site Options page, including

    • SITE_NAME: Inserts the name of your WordPress site
    • BLOG_URL: Inserts the URL of the new member’s blog
    • USERNAME: Inserts the new member’s username
    • PASSWORD: Inserts the new member’s password
    • BLOG_URLwp-login.php: Inserts the hyperlinked login URL of the new member’s blog
    • SITE_URL: Inserts the hyperlinked URL of your WordPress site
  • Welcome User Email: This setting is the text of the email that newly registered users receive when they complete the registration process. The variables used for the Welcome Email setting apply to this email configuration as well.
  • First Post: This setting is the first default post displayed on every newly created site in your network. WordPress provides some default text that you can leave in place, or you can type your desired text in the text box.

    You can use this area to provide useful information about your site and services. This information serves as a nice guide for new users, because they can view that post on the Edit Post pages of their Dashboards and see how it was entered and formatted. You can also use the variables described for the Welcome Email setting (earlier in this list) to have WordPress automatically add some information for you.

  • First Page: Similar to the First Post setting, this setting is the default text for a default page displayed on every newly created site on your network. (The First Page text box doesn’t include default text; if you leave it blank, WordPress doesn’t create a default page.)
  • First Comment: This setting is the first default comment displayed for the first default post on every newly created site within your network. Type the text that you want to appear in the first comment on every site that’s created in your community.
  • First Comment Author: Type the name of the author of the First Comment on new sites in your network.
  • First Comment URL: Type the web address (URL) of the author of the First Comment. WordPress hyperlinks the First Comment Author’s name to the URL you type.

Upload Settings

The Upload Settings section (see Figure 13-6) defines global values pertaining to the type of files you allow site owners within your network to upload by using the file upload feature of the WordPress Add Media window (see Chapter 6).

image

FIGURE 13-6: Upload Settings section of the Network Settings page.

The types of files that site owners can upload include images, videos, documents, and music.

The first option in the Upload Settings section is Site Upload Space. The amount is in megabytes (MB), and the suggested storage space is set, by default, to 100MB. This amount of hard drive space is what you give users to store the files they upload to their blogs. If you want to change the default storage space, type a number in the text box.

The next text field is Upload File Types, which defines the types of files that you, as the network administrator, will allow the site owners to upload to their sites on their Dashboards. Users can’t upload any file types that don’t appear in this text box. You can remove any default file types and add new ones.

The final option in the Upload Settings section is Max Upload File Size. This amount is in kilobytes (KB), and the default file size is 1500KB, so a user can’t upload a file larger than 1500KB. Adjust this number as you see fit by typing a new number in the text box.

Menu Settings

The Plugins administration menu is disabled on the Dashboards of all network site owners, but the network administrator always has access to the Plugins menu. If you leave this check box unselected (refer to Figure 13-6), the Plugins page is visible to users on their own site’s Dashboard. Select the box to enable the Plugins administration menu for your network users. For more information about using plugins with WordPress, see Chapter 7.

image

FIGURE 13-7: Site-management options on the Sites screen.

remember When you finish configuring the settings on the Network Settings screen, don’t forget to click the Save Changes button at the bottom of the page, below the Menu Settings section. If you navigate away from the Network Settings page without clicking the Save Changes button, none of your configurations will be saved, and you’ll need to go through the entire process again.

Sites

Clicking the Sites menu item on the Network Admin Dashboard takes you to the Sites screen, where you can manage your individual sites. Although each site on the network has its own Dashboard for basic tasks, such as posting and changing themes, the Sites page is where you create and delete sites, as well as edit the properties of the sites on your network. Editing information from this page is handy when you have problems accessing a site’s Dashboard.

The Sites screen also lists all the sites within your network and shows the following statistics for each site:

  • URL: The site’s path in your network. In Figure 13-7, you see a site listed with the path newsite. This path means that the site’s domain is newsite.yourdomain.com (if you’re using a subdomain setup) or yoursite.com/newsite (if you’re using a subdirectory setup). I discuss subdomains and subdirectories in “DNS” earlier in this chapter.
  • Last Updated: The date when the site was last updated (or published to).
  • Registered: The date when the site was registered in your network.
  • Users: The username and email address associated with the user(s) of that site.

When you hover your mouse pointer over the path name of a site on your network, you see a handy list of links that helps you manage the site (these links also appear as tabs on the Edit Site screen seen in Figure 13-8). The options that appear below a site listing when you hover on the site name include

  • Edit: Click this link to go to the Edit Site screen (see Figure 13-8), where you can change aspects of each site.
  • Dashboard: Click this link to go to the Dashboard of the site.
  • Deactivate: Click this link to mark the site for deletion from your network. A message appears in a pop-up window, asking you to confirm your intention to deactivate the site. Click the Yes button to confirm. The user’s site displays a message stating that the site has been deleted.

    You can reverse this action by revisiting the Sites screen and clicking the Activate link that appears below the site pathname. (The Activate link appears only for sites that are marked as Deactivated.)

  • Archive: Click this link to archive the site on your network and prevent visitors from viewing it. The user’s site displays a message stating This site has been archived or suspended.

    You can reverse this action by revisiting the Sites screen and clicking the Unarchive link that appears below the site’s pathname. (The Unarchive link appears only for sites that are marked as Archived.)

  • Spam: Click this link to mark the site as spam and block users from accessing the Dashboard. WordPress displays the message This site has been archived or suspended.

    You can reverse this action by revisiting the Sites screen and clicking the Not Spam link that appears below the site’s pathname. (The Not Spam link appears only for sites that are marked as Spam.)

  • Delete: Click this link to delete the site from your network of sites. Although a confirmation screen asks you to confirm your intention to delete the site, after you confirm the deletion, you can’t reverse this decision.
  • Visit: Click this link to visit the live site in your web browser.
image

FIGURE 13-8: The Edit Site screen.

Generally, you use the Edit Site screen only when the settings are unavailable from the Dashboard of that particular site. Configure these options on the four tabs of the Edit Site screen:

  • Info: On this tab, you can edit the site’s domain, path, registered date, updated date, and attributes (Public, Archived, Spam, Deleted, or Mature).
  • Users: On this tab, you can manage the users who are assigned to the site, as well as add users to the site.
  • Themes: On this tab, you can enable themes for the site. This capability is particularly useful if you have themes that aren’t network-enabled (see the “Themes” section later in this chapter). All the themes that aren’t enabled within your network are listed on the Themes tab, which allows you to enable themes on a per-site basis.
  • Settings: The settings on this tab cover all the database settings for the site that you’re editing. You rarely, if ever, need to edit these settings because as the network administrator, you have access to each user’s Dashboard and should be able to make any changes in the site’s configuration settings there.

The Sites menu also includes a link called Add New. Click that link to load the Add New Site screen (see Figure 13-9) in your Network Admin Dashboard. Fill in the Site Address (URL), Site Title, Site Language, and Admin Email fields and then click the Add Site button to add the site to your network. If the Admin Email you entered is associated with an existing user, the new site is assigned to that user on your network. If the user doesn’t exist, WordPress creates a new user and sends a notification email. The site is immediately accessible. The user receives an email containing a link to his site, a login link, and his username and password.

image

FIGURE 13-9: The Add New Site screen of the Network Admin Dashboard.

Users

Clicking the Users link on the Network Admin Dashboard takes you to the Users screen (see Figure 13-10), where you see a full list of members, or users, within your network.

image

FIGURE 13-10: The Users screen.

The Users screen lists the following information about each user:

  • Username: This setting is the login name the member uses when she logs in to her account in your community.
  • Name: This setting is the user’s real name, taken from her profile. If the user hasn’t provided her name in her profile, this column is blank.
  • Email: This setting is the email address the user entered when she registered on your site.
  • Registered: This setting is the date when the user registered.
  • Sites: If you enable sites within your WordPress Network, this setting lists any sites where the user is a member.

You can add and delete users to the network, as well as manage users, by clicking the Edit or Delete link that appears below their names when you hover over them with your mouse pointer.

To delete a user, simply hover over the username in the list that appears on the Users screen. Click the Delete link. A new screen appears, telling you to transfer this user’s posts and links to another user account (yours, most likely). Then click the Confirm Deletion button. WordPress removes the user from the network.

warning This action is irreversible, so be certain about your decision before you click that button!

You can also edit a user’s profile information by clicking the Edit link that appears below his name when you hover your mouse pointer over it on the Users screen. Clicking that link takes you to the Profile screen (see Figure 13-11).

image

FIGURE 13-11: The Profile screen.

Also on the Users menu of the Network Admin Dashboard is a link called Add New. Click that link to load the Add New User screen (see Figure 13-12).

image

FIGURE 13-12: The Add New User screen of the Network Admin Dashboard.

You can add a new user by filling in the Username and Email fields and then clicking the Add User button. WordPress sends the new user an email notification of the new account, along with the site URL, her username, and her password (randomly generated by WordPress at the time the user account is created).

Themes

When a network is enabled, only users with Network Admin access have permission to install themes, which are shared across the network. You can see how to find, install, and activate new themes in your WordPress installation in Chapter 8. After you install a theme, you must enable it on your network to have the theme appear on the Appearance menu of each site. To access the Themes screen (shown in Figure 13-13), click the Themes link on the Themes menu of the Network Admin Dashboard.

image

FIGURE 13-13: The Themes screen.

Plugins

By and large, all WordPress plugins work on your network. Some special plugins exists, however, and using plugins on a network involves some special considerations.

tip For details on finding, installing, and activating plugins in WordPress, see Chapter 7.

Browse to the Plugins screen of your WordPress Network Admin Dashboard by clicking the Plugins link. The Plugins screen is almost the same as the one shown in Chapter 7, but if you don’t know where to look, you can easily miss one very small, subtle difference. Check out Figure 13-14, and look below the name of the plugin. Do you see the Network Activate link? That link is the big difference between plugins listed on the regular Dashboard and those listed on the Network Admin Dashboard. As the network administrator, you can enable certain plugins to be activated across your network. All sites on your network will have the network-activated plugin features available, in contrast to plugins that you activate on the regular Dashboard (Site Admin), which are activated and available only for your main website.

image

FIGURE 13-14: The network Plugins screen.

tip If you select the Plugins administration menu (see “Menu Settings” earlier in this chapter) on the Network Settings page, users see the plugins listed on their Plugins pages of their Dashboard. In their list of plugins, they see only the plugins that you haven’t network-activated — that is, all the plugins you installed in your WordPress installation but not activated on that user’s site. Users can activate and deactivate those plugins as they desire.

Only network administrators have access to install new plugins on the site; regular users within the network don’t have that kind of access (unless you’ve made them network administrators in their User settings).

Also located on the Plugins menu of the Network Admin Dashboard are two other links: Add New and Editor. The Add New link lets you add and install new plugins by searching WordPress plugins within your Dashboard, and the Editor link gives you access to the Plugin Editor. I cover these topics in detail in Chapter 7.

Updates

Clicking the Updates link in the Dashboard menu (refer to Figure 13-3) gives you access to the WordPress Updates page, which takes you through the same process of upgrading your WordPress installation software. WordPress takes the extra step of also upgrading all sites within your network so that they all use the same, upgraded feature sets.

If the process of upgrading network sites stalls or stops, the URL of the last site upgraded appears on the WordPress Updates page. The network administrator can access the Dashboard of the site where the upgrade stopped, which usually clears up the issue. A user accessing his site Dashboard after an upgrade also triggers the update process.

Stopping Spam Signups and Splogs

If you choose to have open signups, in which any member of the public can register and create a new site on your network, at some point, automated bots run by malicious users and spammers will visit your network signup page and attempt to create sites on your network. They do so by automated means, hoping to create links to their sites or fill their site on your network with spam posts. This kind of spam blog or site is a splog.

Spam bloggers don’t hack your system to take advantage of this feature; they call aspects of the signup page directly. You can do a few simple things to slow them or stop them.

Diverting sploggers with settings and code

In the “Registration Settings” section earlier in this chapter, I go over a few options, including areas in which you can specify email addresses to allow or block. The Add New Users check box (refer to Figure 13-4) stops many spammers when it’s deselected. When spammers access the system to set up a spam site, they often use the Add New Users feature to programmatically (through the use of programs built into the bots) create many other sites.

Spammers often find your site via Google, and that’s where they find the link to the signup page. You can stop Google and other search engines from crawling your signup page by adding rel=nofollow,noindex to the signup page link. To do so, wherever you add a link to your signup page, inviting new users to sign up, the HTML code you use to add the nofollow,noindex looks like this:

<a href="http://yoursite.com/wp-signup.php" rel="nofollow,noindex ">Get your own site here</a>

You can add this code to any page or widget as a normal link to instruct legitimate visitors to sign up for a site on your network.

Preventing spam with plugins

Plugins can help stop spam blogs, too. The Moderate New Blogs plugin interrupts the user signup process and sends you (the network administrator) an email notification that a user has signed up for a site. Then you can determine whether the site is legitimate. Download the plugin at https://wordpress.org/plugins/moderate-new-blogs.

The WangGuard/Sploghunter plugin was written mainly to stop sploggers and prevent spam signups on a WordPress site — with or without the network feature activated. You can get the plugin at https://wordpress.org/plugins/wangguard. This plugin is free for personal sites or for sites that have fewer than 5,000 daily registrations or earn less than $200 of monthly income.

The Cookies for Comments plugin (available at https://wordpress.org/plugins/cookies-for-comments) leaves a cookie in a visitor’s browser. If the signup page is visited, the plugin checks for the cookie. If no cookie exists, the signup fails. Be sure to check the installation directions for this plugin, because it requires an edit of the .htaccess file.