Bird
Raised Fist0
Wordpressframework~10 mins

Multisite network basics in Wordpress - Interactive Code Practice

Choose your learning style10 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to enable multisite in WordPress by adding the correct line to wp-config.php.

Wordpress
<?php
// Enable multisite
define('[1]', true);
Drag options to blanks, or click blank then click option'
AALLOW_MULTISITE
BMULTISITE_ENABLED
CENABLE_NETWORK
DWP_ALLOW_MULTISITE
Attempts:
3 left
💡 Hint
Common Mistakes
Using a wrong constant name like MULTISITE_ENABLED.
Forgetting to set the value to true.
Placing the line in the wrong file.
2fill in blank
medium

Complete the code to add the multisite network setup menu in WordPress admin after enabling multisite.

Wordpress
add_action('admin_menu', '[1]');
Drag options to blanks, or click blank then click option'
Anetwork_setup_menu
Bnetwork_admin_menu
Cwp_network_menu
Dsetup_network_menu
Attempts:
3 left
💡 Hint
Common Mistakes
Using a function name that does not exist.
Confusing the hook name with the function name.
3fill in blank
hard

Fix the error in the multisite setup code by completing the constant that defines the network domain in wp-config.php.

Wordpress
define('[1]', 'example.com');
Drag options to blanks, or click blank then click option'
ANETWORK_DOMAIN
BSITE_DOMAIN
CDOMAIN_CURRENT_SITE
DCURRENT_SITE_DOMAIN
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect constant names like NETWORK_DOMAIN.
Misspelling the constant.
4fill in blank
hard

Fill both blanks to complete the multisite network setup code in wp-config.php.

Wordpress
define('[1]', 1);
define('[2]', '/');
Drag options to blanks, or click blank then click option'
ASITE_ID_CURRENT_SITE
BNETWORK_ID
CPATH_CURRENT_SITE
DSITE_PATH
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up SITE_ID_CURRENT_SITE and NETWORK_ID.
Using incorrect path constants.
5fill in blank
hard

Fill all three blanks to complete the multisite network setup code in wp-config.php.

Wordpress
define('[1]', 'example.com');
define('[2]', 1);
define('[3]', '/');
Drag options to blanks, or click blank then click option'
ADOMAIN_CURRENT_SITE
BSITE_ID_CURRENT_SITE
CPATH_CURRENT_SITE
DNETWORK_SITE_DOMAIN
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong constant names or mixing their order.
Setting incorrect values.

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