On a dynamic site the page is not prepared in advance. When a user opens an address, the server runs code, reads the required information from the database and builds the final HTML with a template. For this reason the content can differ for each user or each moment.

Example#

Think of an online store. Each product page uses a shared template, but the name, price and stock come from the database. If you change the price in the admin panel, all pages update immediately without editing any file by hand.

What it enables#

  • User sign-up and login
  • Shopping cart and payment
  • Comments and search
  • An admin panel for changing content without programming knowledge
  • Personalized content

Common technologies#

WordPress with PHP and MySQL, Laravel, Django and Node.js applications are examples of ways to build dynamic sites.

Disadvantages#

  • It is slower than a static site unless caching is used
  • It has a larger security attack surface, because code and a database are involved
  • It needs regular maintenance, updates and backups

A practical note#

Most dynamic sites use a caching plugin to keep pages temporarily as ready-made HTML so their speed gets close to a static site. This combination is very common in WordPress.