SponsoredHosinger Special Offer

WP WordPress Theme Development

Build classic and block WordPress themes from scratch: the template hierarchy, The Loop, the_title() and the_content(), template parts, menus, the Customizer, child themes and theme.json.

Testing and Releasing a Theme

WordPress Theme Development Lesson 30 of 30 ~3 min read

Overview

Before a theme reaches a real site it should pass a checklist of content, accessibility, code-standard and performance tests — the same checks the WordPress.org theme review team runs on every submission.

1. Content and layout testing

  • Import the Theme Unit Test data (lesson 2) and click through every post. It contains every edge case: no title, very long titles, huge images, nested comments, every block.
  • Test with no widgets, no menu assigned and no featured images — the theme must still look intentional.
  • Check every template: front page, blog index, single post, page, each archive type, search with and without results, and 404.
  • Check at 320 px, 768 px and 1440 px wide.

2. Accessibility

  • Unplug the mouse. Tab through the whole site: every link and button must be reachable and show a visible focus outline.
  • The skip link appears on the first Tab press and jumps to the content.
  • Text meets WCAG contrast — 4.5:1 for body text. GizDevCraft's Contrast Checker tool tests this.
  • Images have alt text, headings follow a logical order, and links make sense out of context — no "click here".

3. Code quality

# Install the WordPress coding standards for PHP_CodeSniffer
composer require --dev wp-coding-standards/wpcs dealerdirect/phpcodesniffer-composer-installer

# Check the whole theme
vendor/bin/phpcs --standard=WordPress --extensions=php .
  • Install the Theme Check plugin and run it from Appearance → Theme Check. Fix every "Required" item.
  • With WP_DEBUG on, wp-content/debug.log must stay empty while you browse every template.
  • Run Query Monitor on each template and look for slow or duplicated queries.

4. Performance

  • Run Lighthouse in Chrome DevTools on the home page and a single post.
  • Load scripts only on the pages that use them (lesson 12) and with defer.
  • Register image sizes that match the layout so pages never download oversized images (lesson 19).

5. Packaging

Ship only what the theme needs. Development files stay behind:

# From wp-content/themes/
zip -r gdc-starter-1.0.0.zip gdc-starter \
    -x "gdc-starter/node_modules/*" \
    -x "gdc-starter/vendor/*" \
    -x "gdc-starter/.git/*" \
    -x "*.DS_Store"

Before zipping, bump Version in style.css, regenerate the .pot file and update the changelog.

6. Submitting to WordPress.org

  1. Add a readme.txt with a description, changelog, and copyright and licence details for every bundled image and font — all must be GPL-compatible.
  2. Make sure screenshot.png is 1200 × 900 and shows the theme itself.
  3. Upload the zip at wordpress.org/themes/upload.
  4. A reviewer checks it against the theme requirements. Fix any issues they raise and reply on the ticket.

Where to go next

You have built a complete classic theme and a block theme from scratch. The natural next step is the WordPress Plugin Development path: themes present content, and plugins add the features — custom post types, settings pages, shortcodes and REST endpoints — that your themes will display.

Practice

  • Run Theme Check on GDC Starter and fix every required item.
  • Tab through the whole site with a keyboard only.
  • Package version 1.0.0 as a zip and install it on a fresh local site to confirm nothing is missing.
Create a free account to save which lessons you've finished. Save my progress