35+ Hands-on WordPress Lab Exercises & Real-World Practice Projects

True mastery in software engineering comes not from reading theory, but from writing code, breaking things, and fixing them. This laboratory practice session provides 35+ structured hands-on exercises aligned with university BCA, MCA, and B.Tech computer science curricula, progressing systematically from foundational CMS administration through advanced PHP theme engineering and custom plugin development.

Lab Section 1: CMS Foundations & Content Architecture (Exercises 1 - 10)

# Exercise Title Problem Statement & Expected Deliverable
Lab 1 Localhost Stack Setup Install XAMPP/LocalWP. Create a MySQL database named veewom_lab with utf8mb4_unicode_ci collation. Execute the 5-minute install with custom table prefix vw_.
Lab 2 Permalinks Hardening Configure clean SEO permalinks using /%postname%/. Verify that Apache .htaccess is updated with correct mod_rewrite rules.
Lab 3 Content Modeling (Posts vs Pages) Create a 3-tier hierarchical page structure (/academics/bca/syllabus/). Create a blog post categorized under Programming > PHP with 3 descriptive tags.
Lab 4 Gutenberg Layout Mastery Build a multi-column landing section using native Gutenberg Columns (33/66 split), Cover Block with background overlay, and Button blocks with anchor scroll targets.
Lab 5 Synced Pattern Implementation Design a styled "Author Bio & Newsletter" block group. Convert it into a Synced Pattern. Embed it across 3 separate posts and verify that editing it once updates all 3 pages globally.
Lab 6 Taxonomy URL Optimization Rename default "Uncategorized" to "Technology". Configure Rank Math to strip category base and verify that /category/technology/ redirects cleanly to /technology/.
Lab 7 Media Library Responsive Images Upload a 2000px high-resolution banner. Verify that WordPress automatically creates Thumbnail (150px), Medium (300px), and Large (1024px) crops in /wp-content/uploads/.
Lab 8 Contact Form with Honeypot Build a responsive lead capture form using Fluent Forms with Name, Email, Subject, Message, and a hidden anti-spam honeypot field. Test form submission.
Lab 9 User Role Access Matrix Create three user accounts: an Editor, an Author, and a Contributor. Log in as Contributor and confirm that you can submit posts for review but cannot publish directly.
Lab 10 Automated Cloud Backups Configure UpdraftPlus to run weekly file backups and daily database backups dispatched to Google Drive or Dropbox. Verify remote file arrival.

Lab Section 2: Custom Theme Engineering in PHP (Exercises 11 - 22)

# Exercise Title Problem Statement & Code Objective
Lab 11 Child Theme from Scratch Create an Astra or Twenty Twenty-Four child theme directory. Write valid style.css metadata and enqueue parent/child stylesheets using wp_enqueue_scripts.
Lab 12 Template Override Copy footer.php into your child theme directory. Add a custom copyright notice and social links. Confirm that your child template renders without altering parent code.
Lab 13 Theme Feature Support In functions.php, hook into after_setup_theme to declare title-tag, post-thumbnails, and html5 markup support.
Lab 14 Navigation Menu Registration Register two distinct navigation menu locations (primary_nav and footer_nav) using register_nav_menus(). Render the primary menu in header.php with wp_nav_menu().
Lab 15 Custom The Loop Implementation Code a semantic WordPress Loop in index.php displaying post title, permalink, published date, author name, featured image thumbnail, and excerpt with pagination.
Lab 16 Template Hierarchy Verification Create a template file named category-programming.php. Confirm that visiting the Programming category archive uses your bespoke template while all other categories fall back to archive.php.
Lab 17 Custom Action Hook Create a custom action hook in header.php named do_action('veewom_before_header'). In functions.php, attach a callback that renders a top promotional banner bar.
Lab 18 Custom Filter Hook Hook into the_content using add_filter(). Write a PHP callback that automatically appends estimated reading time (assuming 200 words per minute) to the top of every post.
Lab 19 Excerpt Length Modification Filter the default excerpt length from 55 words down to 25 words using the excerpt_length filter hook in functions.php.
Lab 20 Custom Post Type Registration Register a Custom Post Type named book with title, editor, thumbnail, and custom rewrite slug /library/. Enable Gutenberg support via 'show_in_rest' => true.
Lab 21 Custom Taxonomy Registration Register a hierarchical taxonomy named genre and attach it to your book CPT. Add terms: Fiction, Science Fiction, Computer Science.
Lab 22 Secondary WP_Query Grid On a custom template, instantiate new WP_Query() to query the 4 latest books in the Computer Science genre. Output results in a 4-column responsive grid and call wp_reset_postdata().

Lab Section 3: Advanced APIs, Headless & Performance (Exercises 23 - 35)

# Exercise Title Problem Statement & Deliverable
Lab 23 Custom Field Postmeta Extraction Using native add_post_meta() and get_post_meta(), attach and display an ISBN Number and Book Price on single-book.php.
Lab 24 ACF Integration Build an ACF Field Group for Books with a Star Rating (1-5), Author Name, and Sample Chapter (PDF). Output the fields using get_field() and the_field().
Lab 25 Custom Shortcode Development Develop a custom shortcode [book_price id="42"] that queries postmeta and returns a styled price badge. Ensure shortcode attributes are parsed with shortcode_atts().
Lab 26 Standalone Plugin Creation Create a standalone plugin in /wp-content/plugins/veewom-toolkit/. Register an activation hook that creates a default option in wp_options.
Lab 27 Custom Admin Menu Page Add an administrative options screen in wp-admin using add_menu_page(). Implement CSRF security verification using wp_nonce_field() and check_admin_referer().
Lab 28 Custom REST API Endpoint Register a custom REST route: GET /wp-json/veewom/v1/featured-books using register_rest_route(). Return a clean JSON array of books with titles and prices.
Lab 29 Direct $wpdb SQL Query Write a custom function using $wpdb->get_results() and $wpdb->prepare() to search the database for books priced under a specific integer parameter securely.
Lab 30 Gutenberg Block Development Scaffold a custom block using npx @wordpress/create-block. Edit edit.js to allow editing a headline with RichText and verify that save.js outputs clean HTML.
Lab 31 Headless Next.js Fetch Create a Next.js 14 app. Write a server component that fetches posts from your local WordPress REST API (/wp-json/wp/v2/posts) and renders them in React.
Lab 32 WooCommerce Store Setup Install WooCommerce. Create a Variable Product (T-Shirt with Size and Color variations). Configure Stripe Test Mode and complete a test checkout.
Lab 33 Full Site Editing (FSE) Theme Activate Twenty Twenty-Four. Open theme.json and define a custom color palette containing #ff6600. Verify that CSS presets are generated in the document head.
Lab 34 WP-CLI Terminal Automation Using terminal command-line only: Install a plugin, export the MySQL database, and run a safe wp search-replace with the --dry-run flag.
Lab 35 Core Web Vitals Audit Run your local project through Chrome DevTools Lighthouse audit. Implement WebP image compression and lazy loading to achieve a performance score of 95+.

Capstone BCA Final Year Project Idea

Combine Exercises 20 through 32 to build a full-fledged College Course & Student Portal: Custom Post Type Courses, custom taxonomy Departments, ACF custom fields for syllabus PDFs and fees, WooCommerce integration for online tuition payment, and a REST API endpoint serving data to a mobile React Native student app!

Frequently Asked Questions (FAQ) - Student & Interview Review

Q1. Where should I practice these exercises without breaking my live site?

Always complete lab assignments on an isolated **Localhost development sandbox** using LocalWP or XAMPP. This ensures complete privacy and zero hosting expense.

Q2. How can I debug PHP errors if my screen turns completely blank during a lab?

Enable WordPress debug logging in `wp-config.php`: set `define('WP_DEBUG', true);` and `define('WP_DEBUG_LOG', true);`. Inspect the generated error log file located at `/wp-content/debug.log`.

Q3. Can I use Git to track my laboratory exercises?

Yes! Initialize a Git repository inside your custom theme or custom plugin folder (`git init`) and commit each completed exercise as a milestone commit.

Explore Related WordPress Tutorials & Next Steps

Expand your CMS mastery by studying these tightly integrated WordPress development topics:

100+ Interview Questions & Answers

Test your theoretical and practical knowledge with comprehensive Q&A.

BCA University Viva Guide

Prepare for college practical examinations and project demonstrations.

Developer Cheat Sheet

Quick-reference syntax for hooks, query loops, and template tags.

Common Errors & Fixes

Debug syntax errors and database issues that occur during lab sessions.

Share Share on Facebook Share on Twitter Share on LinkedIn Pin on Pinterest Share on Reddit

You may also like this!