How to use multiple sports at once with multisite

One question I’ve received fairly regularly is if Sports Bench can run multiple sports at once. And the answer is unfortunately no.

Because of the way the database needs to be set up, only one sport can be run on a site. But you might ask yourself how are the demo sites for Sports Bench able to run here?

I have a two-word answer for you: WordPress multisite.

What is WordPress Multisite?

WordPress multisite is how you run multiple WordPress sites from one WordPress install and domain. You can also use the same plugins and themes across all of the sites in the network.

This is how the Sports Bench demos are run. Each of the demo sites are sites in the Sports Bench network. They all share the Sports Bench plugin and theme, but they have a separate set of tables in the database, which is the key in all of this. Because they have a separate sets of tables, they can each run a different sport without the tables all being jumbled and basically unreadable.

How to set up multisite?

Setting up multisite for your install can be a bit tricky, however. Some hosts, like WP Engine, have tools on their dashboards to turn your site into a multisite install. But the main way you can do this is by adding the following line of code to the wp-config.php file.

define('WP_ALLOW_MULTISITE', true);

Then log into the admin and go to Tools -> Network Setup. Here’s where you can define whether the sites will be a subdomain or just directories for the URL. If you chose subdomain, there likely will be more setup required for the domains depending on your host and domain registrar. You can learn more about how to set up multisite here.

Using multisite for multiple sports

Now comes the simple part. Upload the Sports Bench plugin and hit “Network Activate”. Now any current site in the network has Sports Bench activated and any future site will have Sports Bench running at the start.

You might, however, come across one problem. Sometimes all of the tables for Sports Bench aren’t added when creating a new site. If that happens, you can run the MySQL found on line XXX on your database via MyPHPAdmin. Just make sure the table variable prefix is changed to your table prefix, and you can delete the line about the character set at the bottom of each statement.

Otherwise, congrats. You’re now able to display multiple sports on your site. Enjoy!