Skip to content
City ofSpringfield live site

Deliverable 08 · Develop

WordPress Build & QA

Block theme structure, content model, hosting, accessibility, testing and launch readiness.

Stack

Standard WordPress, used the modern way. No page builder, no plugins required for the design, nothing the City’s team couldn’t host and maintain on ordinary WordPress hosting.

  • WordPress block theme

    WordPress 7.1 · springfield 0.5.0

    City staff already know WordPress. A block theme means every page, header and footer is editable block markup instead of PHP templates only a developer can touch.

  • theme.json

    schema version 3

    One file holds the palette, three font families, six font sizes, five spacing steps, two layout widths and the card shadow. WordPress turns it into Global Styles and editor controls.

  • PHP block patterns

    6 patterns · Inserter: no

    Header, footer, hero, quick services, community card and resources strip are generated in PHP (so URLs and icons stay correct) but output standard block markup.

  • Custom post types

    event · showcase · sf_request + industry

    Events carry start, end and location meta; businesses are grouped by a hierarchical Industry taxonomy; sample requests feed City Insights. All registered in functions.php and inc/insights.php.

  • Vanilla JavaScript

    forms.js 3.1 KB · insights.js 3.8 KB

    The service previews and City Insights need a few hundred lines of plain JS, loaded only on /demo/. No framework, no build step, no dependencies to patch.

  • WP-CLI setup scripts

    setup.sh · seed*.php · serve.sh

    One idempotent command installs WordPress, activates the theme and seeds every page, news post, event, business and photo. Safe to re-run.

  • GoDaddy cPanel + Apache

    PHP 8.2

    Standard shared WordPress hosting the City can manage itself, on the springfield.davinci-x.com subdomain.

  • GitHub repository

    jloliv/springfield-wordpress · private

    Theme, scripts, README and TEST-REPORT under version control. WordPress core, the database, uploads and credentials are deliberately left out.

CMS
WordPress 7.1 (block theme)
Server
PHP 8.2 · Apache on GoDaddy cPanel hosting
Domain
springfield.davinci-x.com (subdomain of the DaVinci-X site)
Local dev
PHP built-in server on port 8095 via scripts/serve.sh and router.php; WP-CLI setup in scripts/setup.sh

System architecture

A classic WordPress request: content in the database, presentation in the theme, HTML rendered by PHP on each visit. The interesting part is the browser at the bottom, where the service previews deliberately stop.

Springfield WordPress system architectureCity staff edit content in wp-admin and the Site Editor; WordPress stores it in the MySQL database. On each request, PHP 8.2 on Apache at GoDaddy runs WordPress with the springfield block theme: theme.json, templates, parts, PHP patterns and the inc folder. The theme produces three kinds of page: public pages, service previews and City Insights. HTML goes to the visitor's browser. Inside the browser, a sample problem report is saved only in sessionStorage for that tab and read back by City Insights; nothing from the forms is sent back to the server.WordPress databaseMySQL · content, meta, terms, settingswp_postswp_postmetawp_termswp_optionswp_userswp-admin & Site EditorSigned-in City staff onlyPages, News, Events, Businesses,Sample requests, Global StylessavesWP_Query · post meta · taxonomyspringfield block themewp-content/themes/springfieldfunctions.php registers post types, meta, shortcodes & the event blocktheme.jsontemplates/parts/patterns/inc/assets/Tokens & Global Styles11 page templatesheader · footer6 PHP patternsicons, forms, insightscss · js · img · site-devPublic pagestemplates/*.html + patternsHome, Residents, Government,News, Calendar, City Directory,Business profiles, Search, 404Service previews/demo/?action=… · forms.jsPay bill, report a problem, permit,trash, parks, careers, records,contact: details → review → doneCity Insights/demo/?action=insightsTotals, status counts, categorychart, filters, register andCSV export of sample requestsPHP 8.2 · Apache · GoDaddy cPanelWordPress 7.1 renders each page as HTML · HTTPS at springfield.davinci-x.com · noindexVisitor's browserHTML + site.css; forms.js and insights.js run only on /demo/forms.jsValidates, shows review,makes SF-DEMO-XXXXXX refNo network requestsessionStorage boundarysf-demo-requestsThis tab only · max 30 recordsCategory + status, no contact detailsinsights.jsMerges your samples withsf_request rows; filters,chart, CSV downloadreportread

Scroll sideways to see the full diagram.

1Everything editors change (pages, news, events, businesses, sample requests and Global Styles) is saved through wp-admin into the database.

2The theme decides how it looks. Templates call patterns, patterns call springfield_icon() and shortcodes like [sf_events] and [sf_service_forms].

3The sessionStorage boundary is the privacy line: what a visitor types into a preview never leaves their tab.

Theme & repository structure

The real folder tree. The theme folder is the deliverable: copy it into wp-content/themes and activate it.

  • springfield-wordpress/
  • ├─ README.md · TEST-REPORT.md# Setup notes and the local verification pass
  • ├─ scripts/
  • │ ├─ setup.sh# Install WordPress, wp-config, activate theme, seed
  • │ ├─ serve.sh · router.php# PHP built-in server on :8095
  • │ ├─ seed.php# Pages, news posts, events
  • │ ├─ seed-businesses.php# City Directory businesses + industries
  • │ ├─ seed-images.php# Imports theme photos into Media
  • │ └─ complete-pages.php · page-content.json# Fuller copy for information pages
  • ├─ site-dev/# This case study (Next.js static export)
  • └─ theme/springfield/# The installable theme
  • ├─ style.css# Theme header (name, version, requirements)
  • ├─ theme.json# Design tokens and Global Styles
  • ├─ functions.php# Post types, meta, [sf_events], event block, noindex
  • ├─ inc/
  • │ ├─ icons.php# 13 inline SVG icons: springfield_icon()
  • │ ├─ service-forms.php# [sf_service_forms]: 8 service previews
  • │ └─ insights.php# sf_request type, meta box, City Insights
  • ├─ templates/# front-page, home, index, page, page-contact,
  • │# page-demo, single, single-event, archive-event,
  • │# search, 404 (11 templates)
  • ├─ parts/# header.html, footer.html
  • ├─ patterns/# header, footer, home-hero, home-services,
  • │# home-community, home-resources
  • └─ assets/
  • ├─ css/# site.css (14 KB), forms.css (4 KB)
  • ├─ js/# forms.js, insights.js
  • ├─ img/# seal.svg, 5 photos, CREDITS.md
  • └─ site-dev/# Built case study, linked from the footer

Conventions

1Templates stay thin: header part, one main group, footer part. Page-specific layouts live in patterns so they can be reused.

2Everything is prefixed: springfield_ for PHP functions, sf- for CSS classes, sf_ for post meta and shortcodes. No collisions with plugins.

3Seed scripts are idempotent: records are matched by slug and updated in place, so running setup twice never duplicates content.

4Service previews come from one data array in service-forms.php. Adding a ninth service is one array entry, not a new template.

Service preview routes

  • Pay Utility Bill

    /demo/?action=pay-bill

    Account lookup, amount, review, simulated payment confirmation

  • Report a Problem

    /demo/?action=report-problem

    Category + details, review, reference number; optional browser-only tracking

  • Apply for a Permit

    /demo/?action=permit

    Permit type, project details, estimated cost, review/edit, preview confirmation

  • Trash & Recycling

    /demo/?action=trash

    Collection schedules and guidelines

  • Parks & Recreation

    /demo/?action=parks

    Programs, facilities and events

  • Careers

    /demo/?action=employment

    City jobs preview

  • Public Records

    /demo/?action=public-records

    Records request preview

  • Contact

    /demo/?action=contact

    Contact preview (also /contact/)

  • City Insights

    /demo/?action=insights

    Request totals, status counts, category chart, filters, register, CSV export

Content model

Six WordPress content types plus Media, and one record type that lives only in the visitor’s browser. Built-in posts and pages are reused wherever they fit; custom types exist only where the fields are genuinely different.

City content Business directory City Insights Media Browser only◆ key→ reference
Content model of the Springfield WordPress siteEight entities. Pages, News posts and Events are city content. Businesses (the showcase post type) belong to one or more Industries, a hierarchical taxonomy. News, Events and Businesses can each have a featured image from Media. Sample requests (the sf_request post type) are listed by the City Insights page. A Visitor sample lives only in the browser's sessionStorage and is merged with sample requests on screen. The full list of relationships is in the table that follows.NM0..1N0..1NNlistsmerge0..1Pagepage◆ ID post_name (slug) post_content (blocks)→ post_parentPost · Newspost◆ ID post_date post_title→ _thumbnail_idEventevent◆ ID sf_event_start sf_event_end sf_location→ _thumbnail_idBusinessshowcase◆ ID sf_business_type sf_address sf_features menu_orderIndustrytaxonomy◆ term_id slug name→ parentSample requestsf_request◆ ID post_title (SF-1040…) sf_category sf_status sf_neighborhoodVisitor samplebrowser◆ reference SF-DEMO-… category status = Received neighborhood = DemoMediaattachment◆ ID file (uploads/) alt text source_image (meta)Stored in WordPress tablesPosts of every type → wp_postssf_* fields → wp_postmeta (registered meta)Industry → wp_terms + wp_term_relationshipsDashed: not a database key

Scroll sideways to see the full diagram.

Relationships
FromToCardinalityVia
Showcase (Business)IndustryN : Mwp_term_relationships · /industry/{slug}/ archives
IndustryIndustryN : 0..1term parent (hierarchical taxonomy)
Post (News)MediaN : 0..1_thumbnail_id featured image
EventMediaN : 0..1_thumbnail_id featured image
Showcase (Business)MediaN : 0..1_thumbnail_id featured image
PagePageN : 0..1post_parent (page hierarchy)
Page (Service Center /demo/)Sample request1 : Nget_posts(sf_request) when action=insights; not a stored key
Visitor sampleSample requestmergedinsights.js joins both lists in the browser; never written to the database
Types & where they appear
PagespageResidents, Services, Government, Our Community, Contact, Service Center (/demo/)
NewspostCity news with featured images; /news/ archive
EventseventCustom post type with date, time and location; /calendar/
BusinessesshowcaseCustom post type for the city business directory; /business/{slug}/
IndustriesindustryTaxonomy grouping businesses; /industry/{slug}/
Sample requestssf_requestCustom post type behind City Insights: category, neighborhood, status

Local development & deployment

From an empty folder to the live subdomain. Every step is a script or a standard WordPress screen, so the City’s next developer can repeat it.

  1. 01Local secrets

    Copy .env.example to .env.local with the local database and admin credentials. The file is git-ignored.

    $ cp .env.example .env.local
  2. 02Install & seed

    Downloads WordPress into ./public, writes wp-config (local environment, debug log, theme development mode), installs, symlinks and activates the theme, sets tagline, timezone, permalinks and noindex, then runs the seed scripts.

    $ bash scripts/setup.sh
  3. 03Run locally

    PHP’s built-in server with router.php, which serves real files directly and hands every other URL to WordPress. Admin at /wp-admin.

    $ bash scripts/serve.sh # http://localhost:8095
  4. 04Commit to GitHub

    Theme, scripts and docs are pushed to the private repository. Core, uploads, database dumps, .env files and zips are ignored.

  5. 05Package the theme

    The Site Dev case study is built into theme/springfield/assets/site-dev, then the theme folder is zipped for upload.

    $ npm run build # site-dev → theme assets
  6. 06Deploy to GoDaddy

    Upload and activate the theme (Appearance → Themes or cPanel File Manager into wp-content/themes). Move content with a WordPress WXR export/import, or by running the seed scripts with WP-CLI. Back up the existing site first.

Run seeds only against a demo install. They create and update content by slug. The README is explicit that the repository does not deploy hosting or transfer a database by itself; deployment is the deliberate, backed-up step above.

Security & privacy

A city website handles people’s addresses, payments and complaints. Even as a demo, it is built so that nothing personal is kept and nothing fictional can be mistaken for real.

  • No personal data retained

    Service previews never submit to the server. A sample problem report keeps only reference, category, status and “Demo neighborhood” in sessionStorage for that tab (max 30); names, emails and free-text answers are never stored.

  • Demo labelling everywhere

    A demo banner on every page, a /demo/ explainer page, a fictional-city line in the footer and confirmations that say “This confirmation is a demonstration.” Nothing pretends to pay, file or submit.

  • Not indexed

    A wp_robots filter adds noindex, nofollow to every page, and setup.sh sets blog_public to 0, so a fictional city on a real place name never shows up in search.

  • Admin-only editing

    Event and business meta can be edited only by users who can edit_posts. The sample-request meta box checks a nonce, the user’s capability and an allowlist of values. Sample data seeds only for administrators.

  • Escaped output

    PHP output goes through esc_html, esc_attr and esc_url; City Insights builds every table cell with textContent, never innerHTML, so stored values can’t inject markup.

  • Secrets & backups

    Credentials live in .env.local and wp-config on the server, never in Git. GoDaddy backups and a tested restore are on the launch checklist below, not assumed.

Accessibility

What is built and verified today, and what is not yet. We report it honestly: a local functional pass is not a WCAG audit.

Accessibility checklist with status
RequirementWCAGHow it’s metStatus
Visible focus2.4.7 Focus Visible3px river-blue outline offset 4px on links, buttons and fields; gold-light on the navy footer and hero. Added in the QA pass.Done
Reduced motion2.3.3 · best practiceprefers-reduced-motion removes the service-card lift transition.Done
Button contrast1.4.3 Contrast (Minimum)Gold darkened to #8a6a26 so white button text passes AA; gold-light kept for decoration only.Done
Keyboard menu2.1.1 · 2.4.3Mobile navigation opens from the menu button; Escape closes it and returns focus to the button (verified).Done
Reflow at 375px1.4.10 ReflowNo horizontal overflow on the homepage at 375, 768, 1024 and 1440px, and on eight key pages at 375px.Done
Form labels1.3.1 · 3.3.2Every service-form field has a visible <label for>; the step list marks the current step with aria-current.Done
Status messages4.1.3 Status MessagesForm confirmation has role=“status” and receives focus; City Insights totals update in an aria-live region.Done
Decorative icons1.1.1 Non-text Contentspringfield_icon() outputs aria-hidden, focusable=“false” SVG; icon-only search links carry aria-label.Done
Inline error messages3.3.1 Error IdentificationToday the forms rely on the browser’s built-in required-field messages. Inline, linked error text is designed but not built.Partial
Full WCAG 2.2 AA auditAll AA criteriaAutomated scan of every template plus screen-reader passes (VoiceOver, NVDA) on the deployed site.Planned

8 of 10 done. Color decisions and calculated ratios are on the Design System page.

QA results

From TEST-REPORT.md: a functional pass against the local install at localhost:8095, after the fixes listed below.

  • Crawl

    Passed

    35 URLs

    35 internal URLs returned HTTP 200 with no broken links

  • Widths

    Passed

    4 widths

    Homepage has no horizontal overflow at 375, 768, 1024 and 1440px; eight key pages checked at 375px

  • Keyboard

    Passed

    Menu

    Mobile navigation opens, Escape closes it and returns focus to the menu button

  • Search

    Passed

    “cleanup”

    Search for “cleanup” returns news, events and pages; nonsense queries show a helpful empty state

  • Calendar

    Passed

    5 events

    Calendar shows five events in date order with their own dates, times and locations

  • Editor API

    Passed

    Drafts

    Draft create, update, persistence and block parsing passed through WordPress APIs

Widths checked for horizontal overflow

Viewport widths checked and the pages checked at each
ViewportPagesResult
Phone375pxHomepage + Residents, Services, Government, Our Community, Contact, Calendar, News, Business DirectoryNo overflow
Tablet768pxHomepageNo overflow
Laptop1024pxHomepageNo overflow
Desktop1440pxHomepageNo overflow

Fixed during QA

  • Service-card sizing, mobile header overflow and hero text overlap repaired
  • Visible keyboard focus and reduced-motion support added
  • Gold darkened to #8a6a26 for white button text (AA)
  • All seven homepage images load; PHP and setup-script syntax checks pass

Stated limits

  • Local functional pass, not a full WCAG audit
  • Bundled JPEGs range ~120 KB to 868 KB
  • Admin editor workflow not tested in the browser
  • GoDaddy capacity, DNS, HTTPS, backups and performance to verify before launch
  • Payments, permits, reports, public records and the map remain labelled demo destinations

Performance

What we know from the files, and the targets we will measure on the deployed site. Targets are targets: no performance audit has been run on GoDaddy yet.

Bundled image weight

Actual file sizes in theme/springfield/assets/img.

  • hero.jpg868 KB

    Homepage hero (cover block)

  • community.jpg492 KB

    Our Community card

  • news-roadwork.jpg263 KB

    News: Jefferson Avenue

  • news-cleanup.jpg168 KB

    News: Cleanup Day

  • news-council.jpg118 KB

    News: Capital Plan

Everything else is light: site.css 14 KB, forms.css 4 KB, theme.json 5 KB, seal.svg under 1 KB, and 7 KB of JavaScript that loads only on /demo/.

Launch targetsNot measured yet. To be checked on the GoDaddy deployment, on a mobile profile.
MetricTargetHow
Largest Contentful PaintTarget < 2.5 sCompress and resize the hero (largest image today); serve WordPress-generated sizes via srcset.
Cumulative Layout ShiftTarget < 0.1Seal and thumbnails carry width and height; fonts load with display=swap.
Interaction to Next PaintTarget < 200 msOnly two small scripts, both limited to /demo/.
Hero imageTarget ≤ 250 KBExport at display width in a modern format.
Page cachingTarget OnEnable host or plugin page caching on GoDaddy; WordPress renders on every request otherwise.

Launch checklist & roadmap

What is done, what must be verified on the live host, and where the site goes once real City systems are connected.

Launch checklist

  • Theme live on GoDaddy

    springfield theme active at springfield.davinci-x.com (WordPress 7.1, PHP 8.2, Apache).

    Done
  • Demo labelling & noindex

    Banner on every page, /demo/ explainer, footer disclaimer, wp_robots noindex.

    Done
  • Local QA pass

    35-URL crawl, widths, keyboard menu, search, calendar and editor API (TEST-REPORT.md).

    Done
  • Contrast, focus & motion fixes

    Gold #8a6a26, visible focus, reduced-motion rule.

    Done
  • HTTPS, DNS & capacity

    Confirm certificate, subdomain DNS and hosting plan limits on GoDaddy.

    To verify
  • Backups & recovery

    Schedule backups and run one test restore before relying on them.

    To verify
  • Production URL replacement

    Check no localhost:8095 URLs remain in content or options after migration.

    To verify
  • Editor workflow in a browser

    Publish a page, edit an event, replace a photo through wp-admin (only the API path was tested).

    To verify
  • Clean-browser console check

    Re-check the console without browser extensions, which caused noise in the local logs.

    To verify
  • Image compression

    Bring the five bundled JPEGs (about 120–868 KB) down to web sizes.

    To verify
  • Theme header refresh

    style.css still describes the earlier small-town concept (Fraunces/Nunito Sans, example.com URIs); update to match theme.json.

    To verify

See it live: springfield.davinci-x.com

Post-launch roadmap

Each item replaces a demo preview with a real City service. Order depends on which City systems are ready to connect.

  • Real utility payments Integration

    Replace the simulated payment with the City’s payment processor using hosted, PCI-compliant fields, so card data never touches WordPress.

  • Online permits Integration

    Hand permit applications to the City’s permitting system, with document upload and fee estimates from real schedules.

  • 311 case routing Service

    Turn “Report a Problem” into a tracked case routed to the right department, with real statuses feeding City Insights.

  • Notifications Service

    Email or text updates when a case changes status, plus opt-in alerts for closures, trash schedule changes and emergencies.

  • Spanish-language site Content

    Professionally translated pages and service forms, with a language switcher in the utility bar.

  • Resident accounts Platform

    Optional sign-in to see past requests, saved addresses and payment history, with privacy controls and account deletion.

PreviousDesign System & Style Guide