Bird
Raised Fist0
Wordpressframework~20 mins

Multisite network basics in Wordpress - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
πŸŽ–οΈ
Multisite Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
What is the primary purpose of a WordPress Multisite Network?
Choose the best description of what a WordPress Multisite Network does.
AIt allows managing multiple WordPress sites from a single WordPress installation.
BIt creates a backup of a WordPress site automatically every day.
CIt improves the speed of a single WordPress site by caching pages.
DIt converts a WordPress site into a mobile app automatically.
Attempts:
2 left
πŸ’‘ Hint
Think about how many sites you can control with one WordPress setup.
❓ component_behavior
intermediate
1:30remaining
What happens when you enable Multisite in WordPress?
After enabling Multisite, which of the following is true about the WordPress admin dashboard?
AYou lose access to the original site’s dashboard.
BYou get a new Network Admin dashboard to manage all sites.
CThe dashboard automatically deletes all plugins.
DThe dashboard changes color but no new features appear.
Attempts:
2 left
πŸ’‘ Hint
Think about how you would manage multiple sites from one place.
πŸ“ Syntax
advanced
2:00remaining
Which code snippet correctly enables Multisite in wp-config.php?
Select the correct line to add to wp-config.php to enable Multisite.
Adefine('ALLOW_MULTISITE', true);
Bdefine('ENABLE_MULTISITE', true);
Cdefine('MULTISITE_ENABLE', true);
Ddefine('WP_ALLOW_MULTISITE', true);
Attempts:
2 left
πŸ’‘ Hint
Look for the exact constant WordPress expects to enable Multisite.
❓ state_output
advanced
2:00remaining
What is the effect of the following code in a Multisite environment?
Given this code in a plugin activated network-wide, what will get_bloginfo('name') return on site ID 3?
Wordpress
<?php
switch_to_blog(3);
$name = get_bloginfo('name');
restore_current_blog();
echo $name;
?>
AIt outputs the site title of the current site before switching.
BIt causes a fatal error because switch_to_blog is not allowed.
CIt outputs the site title of site ID 3.
DIt outputs nothing because restore_current_blog clears the output.
Attempts:
2 left
πŸ’‘ Hint
Think about what switch_to_blog does before calling get_bloginfo.
πŸ”§ Debug
expert
2:30remaining
Why does this Multisite plugin activation code fail on some sites?
This code is in a plugin activated network-wide. It tries to add a custom option to each site but only works on the main site. Why?
ABecause add_option runs only once on the main site, not on each site in the network.
BBecause network_admin_menu hook does not exist in Multisite.
CBecause add_option requires a site ID parameter in Multisite.
DBecause plugins cannot add options in Multisite networks.
Attempts:
2 left
πŸ’‘ Hint
Consider when and where add_option runs in a network-wide plugin.

Practice

(1/5)
1. What is the main purpose of WordPress Multisite?
easy
A. To create a backup of a WordPress site
B. To speed up a single WordPress site
C. To run multiple WordPress sites from a single installation
D. To convert WordPress into an e-commerce platform

Solution

  1. Step 1: Understand the definition of Multisite

    WordPress Multisite allows managing many sites using one WordPress installation.
  2. Step 2: Compare options with this definition

    Only To run multiple WordPress sites from a single installation matches this purpose; others describe unrelated features.
  3. Final Answer:

    To run multiple WordPress sites from a single installation -> Option C
  4. Quick Check:

    Multisite = multiple sites, one install [OK]
Hint: Multisite means many sites on one WordPress install [OK]
Common Mistakes:
  • Confusing multisite with backups
  • Thinking multisite speeds up a single site
  • Mixing multisite with e-commerce features
2. Which file must you edit to enable WordPress Multisite?
easy
A. wp-config.php
B. functions.php
C. index.php
D. .htaccess

Solution

  1. Step 1: Identify the file for enabling multisite

    WordPress requires editing wp-config.php to enable multisite mode.
  2. Step 2: Check other files' roles

    functions.php is for theme functions, index.php is main template, .htaccess handles URL rewriting but not enabling multisite.
  3. Final Answer:

    wp-config.php -> Option A
  4. Quick Check:

    Enable multisite in wp-config.php [OK]
Hint: Enable multisite by editing wp-config.php [OK]
Common Mistakes:
  • Trying to enable multisite in functions.php
  • Editing .htaccess instead of wp-config.php
  • Confusing index.php with config files
3. After enabling multisite, which two options can you choose for new site URLs?
medium
A. Subdomains or subdirectories
B. Custom domains or IP addresses
C. File paths or query strings
D. Port numbers or protocols

Solution

  1. Step 1: Recall multisite URL options

    WordPress multisite lets you choose between subdomains (site.example.com) or subdirectories (example.com/site) for new sites.
  2. Step 2: Eliminate unrelated options

    Custom domains require extra setup, file paths and query strings are not multisite URL types, ports and protocols are unrelated.
  3. Final Answer:

    Subdomains or subdirectories -> Option A
  4. Quick Check:

    Multisite URLs = subdomains or subdirectories [OK]
Hint: Multisite URLs use subdomains or subdirectories [OK]
Common Mistakes:
  • Thinking custom domains are default multisite URLs
  • Confusing file paths with multisite URL types
  • Mixing ports or protocols with site URLs
4. You enabled multisite but new sites show 404 errors. What is the likely cause?
medium
A. wp-config.php missing multisite enable line
B. Missing or incorrect .htaccess rewrite rules
C. Using subdomains without DNS setup
D. Not activating a theme for new sites

Solution

  1. Step 1: Understand 404 errors after multisite setup

    404 errors usually mean URLs are not routed correctly, often due to missing or wrong .htaccess rewrite rules.
  2. Step 2: Check other options

    Missing multisite enable line causes multisite not to work at all, subdomain DNS issues cause different errors, theme activation doesn't cause 404.
  3. Final Answer:

    Missing or incorrect .htaccess rewrite rules -> Option B
  4. Quick Check:

    404 after multisite = fix .htaccess rewrites [OK]
Hint: Fix 404 by updating .htaccess rewrite rules [OK]
Common Mistakes:
  • Ignoring .htaccess rewrite rules
  • Assuming theme activation fixes 404
  • Confusing DNS issues with rewrite problems
5. Which of the following is a correct sequence to set up a WordPress Multisite network?
hard
A. Edit .htaccess first, then install multisite plugin, then create sites
B. Install a plugin, edit functions.php, create new sites, then configure DNS
C. Create new sites first, then edit wp-config.php and .htaccess
D. Edit wp-config.php to enable multisite, configure .htaccess, choose subdomain or subdirectory, then create new sites

Solution

  1. Step 1: Identify the correct setup order

    First, enable multisite by editing wp-config.php. Then configure .htaccess for URL rewriting. Next, choose subdomain or subdirectory setup. Finally, create new sites.
  2. Step 2: Evaluate other options

    Multisite does not require a plugin; editing functions.php or creating sites before enabling multisite is incorrect.
  3. Final Answer:

    Edit wp-config.php to enable multisite, configure .htaccess, choose subdomain or subdirectory, then create new sites -> Option D
  4. Quick Check:

    Enable multisite in config, set rewrites, pick URL type, add sites [OK]
Hint: Enable multisite in config, set rewrites, then add sites [OK]
Common Mistakes:
  • Trying to create sites before enabling multisite
  • Relying on plugins instead of config edits
  • Editing wrong files in wrong order
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard