Lesson 13Website technologies
- Notion 77 - Static and dynamic webpage: what are the differences?
- Notion 78 - How databases work and what their ecological impact is
- Notion 79 - Is a static website a solution for web eco-design?
- Notion 80 - What is a CMS?
- Notion 81 - What is WordPress?
- Notion 82 - Why optimize your WordPress?
- Notion 83 - How to optimize WordPress?
- Notion 84 - How to turn WordPress into a static website
- Notion 85 - Check your understanding of the main concepts of the lesson.
Notion 84
How to turn WordPress into a static website
Target skills
Risks and challenges of dynamic content
If WordPress is an extremely powerful and popular tool, it nevertheless raises questions about the security, performance, referencing and ecological impact of its website.
A quick reminder of what a dynamic site is.
Dynamic content means that every time a user visits a website, a request is made. The required data is extracted from the database to provide him with what he has requested. This operation occurs on average 1 million times per month for medium to high traffic websites and 10 million times per month for very high traffic websites...
This represents a key issue in terms of website performance, security and environmental impact. It should be remembered that a database has built-in limits and can cease to function in the event of a traffic peak. On the other hand, WordPress sites are more vulnerable to computer attacks, notably via the database or via themes and plugins that are not updated. The maintenance of a dynamic WordPress site is therefore crucial.
Advantages of a static site
A static website does not use a database. It simply cannot be hacked by the database (very common on WordPress sites).
Nor can you be hacked by a contaminated theme or plugin. A static site therefore increases your security considerably.
On the other hand, a static website uses previewed pages and not a database. It loads much faster because there is no back and forth as with dynamic sites.
A static site also does not require the maintenance of themes and plugins or special optimization.
For all those reasons, static sites have less ecological impact than dynamic websites. For more information on this point, read grain 79.
Converting a WordPress site into a static site
For these reasons, you may wish to optimise the performance of your site as well as its security by converting it into a static website.
Beware, this operation is not for the average person! And there are various limitations. For example:
- It is not possible to use contact forms, to have a search function on the site and comments, or anything else that is dynamic in its function. Using third party solutions is an option, but it can be expensive and difficult to implement.
- Any changes to your site will result in a re-publication of the entire site, which may not be a problem for small sites but can be time consuming for larger sites.
Some plugins available to make your WordPress site static:
- Simply Static is the most popular static site builder plugin
- WP2Static is another popular static site builder plugin that allows you to serve a static version of your WordPress website to your users while letting you use WordPress to manage the content of your site.
- Strattic is a serverless WordPress host that allows you to create a lightweight, static version of your WordPress website while allowing you to use WordPress as your backend as usual.
- HardyPress is another serverless hosting option for WordPress users.