WordPress Multisite – A Beginner’s Guide – Part 3

WordPress Multisite – A Beginner’s Guide – Part 3

[read_meter]

If you missed our last two blogs WP Multisite Guide Part 1 and WP Multisite Guide Part 2  on WP Multisite, don’t worry- this guide will get you up to speed. In the previous blogs, we discussed the basics and pros/cons of using a WordPress multisite feature. If you’re considering implementing a multisite for yourself, read on to find out how easy it is to install!

1. Prepare to switch to Multisite.

Before you set up a multisite network, use the listed criteria above to make sure you need one. If everything looks good, go ahead and check the following:

  • To use this feature, you must be the administrator of your WordPress site
  • To edit your site’s files, you’ll need FTP or a file manager.
  • You must have sufficient hosting to support a WordPress multisite network.
  • It’s important to keep all your plugins and themes updated and secure.
  • Only those with access to your WordPress account are people you trust.

Back up your files and deactivate all plugins if you have an existing WordPress site. If not, install WordPress now.

2. Edit wp-config.php.

You’ll need to take the following steps to switch to Multisite: first, add some code to your wp-config.php file. You can access your WordPress core files by using FTP or opening your file manager; after that, simply open wp-config.php.

In this file, scroll down to the line that says:

/* That’s all, stop editing! Happy blogging. */

Just above this line, paste the following code:

/* Multisite */ define( ‘WP_ALLOW_MULTISITE’, true );

Save the file, then restart your browser.

3. Set up a network.

You will see a difference in your WordPress dashboard after adding the code above to wp-config.php.

If you want your network to be based on subdomains, go to Tools > Network Setup in your dashboard and select “subdomain.” If you would rather have it based on subdirectories, select “subdirectory” instead. You can change this later if need be, although it’s usually easier to do so sooner than later.

Once finished on this screen, click Install.

4. Enable the network.

The next thing you’ll see is the activation instructions for your network. They should look something like this:

Image Source

After you finish editing each file, save it and click the login link to continue.

After you finish this, you can start adding new subsites and configuring your multisite settings. To access network settings, go to My Sites and select any options from the dropdown menu.

Databases and WP Multisite Installations

WordPress installations come in three types, which are distinguished by system architecture or the combination of WordPress instances and databases:

  • 1. WordPress Multisite saves space by having multiple WordPress sites share a single database.
  • 2. WordPress experts call having multiple WordPress instances using one database a ‘Single Database.”
  • 3. Multiple Databases: multiple WordPress instances using separate databases.

Image Source

Although there are multiple sites, the installation process for a WordPress site with multiple databases is no different than installing just one WordPress site.

Multiple WordPress Instances with Multiple Databases

Before you begin, create a MySQL database for each blog. If you don’t know how to do this, follow the instructions below.

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

The wp-config.php file is different for each installation. The lines that need to be changed are:

define(‘DB_NAME’, ‘WordPress’);    // The name of the database
define(‘DB_USER’, ‘username’);     // Your MySQL username
define(‘DB_PASSWORD’, ‘password’); // … and password

DB_NAME is 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.

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

The Multisite Feature

You can use the WordPress multisite feature to create a network of websites by installing one instance and database.

If you’re looking to install multiple WordPress sites, the multisite feature may be a good option for you. However, there are some things you should take into account before using it. For more detailed information on this topic, see the following documents:

Multiple WordPress Instances with a Single Database

As described above, the wp-config.php file will differ for each installation when using a multiple-database solution. The only distinction between blogs in this case is a single line:

$table_prefix = ‘wp_’; // example: ‘wp_’ or ‘b2’ or ‘mylogin_’ 

WordPress assigns the table prefix wp_ to its MySQL database tables, but you can choose any prefix you want. By doing this, you create unique identifiers for each blog in your database. For example, if you have three blogs–named Main, Projects, and Test–substitute the prefix wp_ in each blog’s wp-config.php

Main blog:

$table_prefix = ‘main_’; 

 

Projects blog:

$table_prefix = ‘projects_’; 

 

Test blog:

$table_prefix = ‘test_’; 

 

You can use any prefix you want; the ones below are just examples.

Upload each wp-config.php file to its own root/installation directory, then start the installation process.

Multiple Databases, Same Users

You can use the same user base for all your blogs on the same domain by defining the CUSTOM_USER_TABLE and optionally the CUSTOM_USER_META_TABLE constants to point to the same wp_your_blog_users and wp_your_blog_usermeta tables.

See Editing wp-config.php/Custom User and Usermeta Tables.

Multisite: A Hidden WordPress Superpower

Multisite is an unheralded feature of WordPress. Most users won’t need it, but if you find yourself needing to manage multiple sites, Multisite will make your life much easier.

Bid farewell to performing the same mundane tasks for hours on end, and say hello to an intricate network of WordPress installations that are all related to each other. It’s something of a hidden superpower that can save you loads of time if used correctly!

Our thoughts on the pros, cons, and examples of WordPress Multisite. If you want your system built on WP Multisite, schedule a chat with us! You’ll be amazed at how simple it is to get started! Our support channels are always available to help you out!

Please let us know if you found this post useful in the comments section below.

Important Links

  • Home
  • All Access Pass
  • Blog
  • Support
  • Documentation

See us in Action!

Check out the latest video from our Youtube page. We are dropping new content regularly!

© 2023 Copyright: WaaS Hero / IDB Media