A static website sends visitors pages that were built in advance. A dynamic website builds each page on the server, often from a database, at the moment it is requested. Static sites are faster and much harder to hack. Dynamic sites are needed when each visitor sees something different, such as a shopping cart or an account page.
What a static website is
A static website is a set of ready-made files: HTML for the pages, CSS for the design, a little JavaScript for things like menus, plus images. When someone visits a page, the web server finds the file and sends it. Nothing is calculated on the way.
"Static" describes how pages are served, not how they look. A static site can have animation, video, forms, search and a blog. The content changes whenever the files are updated and published again.
What a dynamic website is
A dynamic website runs code on the server for each visit. In WordPress, PHP code reads the page content from a MySQL database, adds the theme and plugin output and assembles the HTML. Caching can store finished copies to save time, but the code, the database and the admin login stay on the live server.
That machinery is what lets a dynamic site show logged-in accounts, live stock levels, shopping carts and comments. It is also what has to be updated and protected.
Static vs dynamic, side by side
| Topic | Static website | Dynamic website |
|---|---|---|
| How pages are made | Built in advance, sent as they are | Built on the server for each request |
| Speed | Fast: no code runs per visit | Depends on server, code and caching |
| Security | Little to attack: no database or login | Code, database and logins to protect |
| Upkeep | Hosting and content changes | Software updates as well |
| Hosting | Any web host or CDN, often cheap | A host that runs the software |
| Personal content | Limited: same page for everyone | Yes: accounts, carts, dashboards |
| Examples | Business sites, portfolios, documentation | Online stores, social networks, banking |
Is WordPress static or dynamic?
WordPress is dynamic. That is also the answer to the "WordPress vs HTML" question: a WordPress page is HTML in the end, but it is generated by PHP and a database on every request unless a cache steps in. A static HTML page is the finished file, with no WordPress behind it.
Many WordPress business sites show every visitor the same page anyway. For those, the dynamic part does no work the visitor can see, while the plugins, database and login still need guarding. Converting the site to static HTML keeps what visitors see and removes what they never used. The WordPress to HTML conversion guide explains the ways to do it.
Can a static site have forms, search and a blog?
- Forms send to a small form handler that emails you, with no CMS behind it.
- Search uses an index built with the site and runs in the visitor's browser.
- A blog works like any other page: each post is a finished file at its own address, with an RSS feed.
- Bookings and payments link to or embed a specialist service, such as a booking system or a payment page.
Which one do you need?
If every visitor sees the same pages and you change the site a few times a month, a static website is the better fit. If visitors log in, buy from a live catalog or post content themselves, you need something dynamic for that part. Many businesses keep the store dynamic and make everything else static.
See your site as a static site.We rebuild your homepage as static HTML, free.
See my homepage redone