Skip to content
SiteShiftCo

Dynamic site

A website where pages are assembled on the server in response to each request, typically by combining a database query with a template.

Also known as: dynamic website, server-rendered site

A dynamic site is a website where pages are assembled in response to each request, rather than served as pre-built files. The page’s HTML is constructed by combining a template with data from a database, an API, or user input.

How a dynamic site works

When a visitor requests a page on a dynamic site, the web server runs application code (commonly PHP, Node.js, Python, Ruby, or another server-side language). That code typically queries a database, retrieves the content, applies it to a template, and returns the resulting HTML to the browser.

For example, on a typical WordPress installation, a request to a blog post URL triggers PHP code that:

  1. Looks up the post in the MySQL database
  2. Retrieves associated metadata (author, comments, categories)
  3. Applies the active theme’s template
  4. Returns the rendered HTML

The page does not exist as a pre-built file; it is generated each time it is requested.

Common uses

Dynamic sites are well suited to:

  • Sites with content that changes frequently throughout the day
  • Sites with logged-in users where each visitor sees personalized content
  • Forums, social platforms, and applications with user-generated content
  • Ecommerce sites with real-time inventory and personalized pricing
  • Search-driven content sites with many filters and result combinations

Common platforms and frameworks

  • WordPress, Drupal, Joomla
  • Shopify, Magento, WooCommerce
  • Ruby on Rails, Django, Laravel applications
  • Custom Node.js, Go, or PHP applications

Performance characteristics

Because the server performs work on each request, dynamic sites tend to be slower than static sites unless caching is used. Common optimization strategies include:

  • Page caching. Storing rendered HTML for a period of time to avoid regenerating it
  • Object caching. Storing database query results
  • CDN integration. Caching static assets (images, CSS, JS) on edge networks
  • Database optimization. Indexes, query tuning, and connection pooling

A well-tuned dynamic site can perform comparably to a static site for cacheable content. Pages that require fresh data on every request are typically slower than static equivalents.

Dynamic vs static sites

AspectDynamic siteStatic site
Page generationPer requestAt build time
Server requirementsApplication server + databaseFile server only
PersonalizationBuilt-inVia JavaScript or APIs
Hosting costTypically higherOften free or low
Update propagationImmediateAfter rebuild and redeploy
Suitability for high content velocityWell suitedAdds friction
Suitability for per-user contentNative supportRequires additional services

Both architectures can produce excellent sites; the choice depends on the use case.

Hybrid approaches

Modern frameworks blur the static/dynamic line. Approaches include:

  • Incremental Static Regeneration (ISR). Pages are pre-built but regenerated periodically or on demand
  • Server-Side Rendering (SSR) with caching. Pages are rendered per request but cached at the edge
  • Islands architecture. Most of the page is static, with small dynamic “islands” hydrated client-side

Frameworks supporting these patterns include Next.js, Nuxt, Astro, SvelteKit, and Remix.

Common misconceptions

  • “Dynamic sites are always slower than static sites.” With effective caching, dynamic sites can match static performance for most content.
  • “WordPress sites are always dynamic.” Most are, but WordPress can also be used as a headless CMS feeding a static site generator.
  • “Static and dynamic are mutually exclusive.” Hybrid approaches allow both within a single site.