Surfing the internet we can find both static websites, which were the first to appear, and dynamic websites that require programming languages such as PHP.
Note: A website is considered the set of individual web pages that make up the same domain (e.g. www.mydomain.com). A website may have a single webpage (the index or home) or hundreds in the case of a blog.
A static website is a set of webpages that only display information without allowing interaction by the visitor. They can have text, images and videos, allowing internal navigation through links, but the content does not change as the user interacts with it.
The base document that is stored on the server can be an HTML document without programming logic and that is sent directly to the browser to display it.
More and more websites across the web have been developed as dynamic, meaning they allow interaction by the visitor.
A dynamic website, for example, allows us to fill out a form, write a comment in a forum or blog post, make a purchase of a product, engage in a survey, vote, etc.
On the other hand, if the website needs to regularly change or update its contents, or add new ones, the best way to manage it is to have a content management system (CMS) such as WordPress.
A content management system or CMS is a computer program that allows creating a work environment for the creation and administration of content, mainly on web pages, by administrators, editors, participants and others. users. It has an interface that controls one or more databases where the website content is hosted. The system allows independent management of content and design. – Wikipedia
WordPress works as a base framework with PHP, and like any good content manager it allows us to add and modify texts, images, navigation links and more with ease.
A content manager provides a private area on the website only accessible by username and password, from which to manage the website, and which is usually called the backend or web admin.
Besides WordPress, other popular CMS software are: Joomla, WooCommerce, Drupal, Wix, Shopify, Ghost, and Magento.
It should be noted that for a content manager like WordPress to work, it needs to be able to connect to a database where all the content and settings are stored.
PHP, both used within WordPress or another framework and independently, has the possibility of connecting and interacting with a database, so both PHP and databases are key and necessary elements to be able to work with dynamic websites.
Note: for PHP to query a database, after connecting to it with the appropriate functions, it requires launching commands from the database’s own language: SQL.
Which is better? A static or dynamic site?
A CMS for a dynamic website can solve many problems, from a development point of view, but there are notable reasons not to use a CMS and instead switch back to static webpages.
As mentioned above, a CMS such as WordPress requires an installation on an Apache or Nginx server, with a programming language such as PHP with its multiple extensions and a database such as SQL, forcing you to keep all this updated and audited.
You will agree that an important factor is security, and unfortunately, that is one of the most important disadvantages of a CMS if they are not kept up to date, audited and armored.
SEO ranking factors
Besides cybersecurity, the most important thing from a marketing perspective is to reach your potential audience, so you need to improve performance to facilitate the SEO ranking of your site. Even if you integrate a cache system in your CMS, the average pageload speed of a static website is much faster.
Also, very importantly, a static site does not have to mean that the user will see fixed content. Having an up-to-date blog is essential for the SEO of any online business. With a static website you can do this easily using Markdown, so the content of your posts will be saved in files, instead of in a database.
Here are some of the most popular extensions that you can integrate into your static website to add dynamic content:
- Comments: Disqus
- eCommerce: BigCommerce or Shopify
- Newsletter: MailChimp
- Form: Typeform
- Social media: AddThis
- Contact forms: Formspree
Static web generators
A static web generator allows you to create, starting from dynamic content, from an API for example, a final static website. It also helps you structure common content on the multiple pages of your website, such as the logo and the menu. Every time you want to rebuild the static content, you can recompile the final page with a simple command.
Let’s take a look at some of the most popular generators:
- Jekyll: It is one of the most popular static web generators. It currentlyhas the largest community and a huge amount of resources such as themes, plugins and documentation.
- Hugo: It’s like Jekyll, although with improved speed when generating the website. In addition, Hugo is simpler, because it does not require much configuration to start your web project. On the flip side, it does not count with as many developers and resources as Jekyll.
- Gatsby: It is the latest software and one of the most interesting, and it is gaining popularity. Based on React.js, it is very fast and allows to speed up loading times. It allows you to produce a modern, high-quality website.
There are many others like Next.JS, Hexo, Slate etc. You can check them out on Jamstack.
Deciding whether to use a static or dynamic web with a CMS is primarily a planning decision and will depend on the requirements of your web project. Now that you know the capabilities of a static website, you will understand that for many websites a CMS is not really necessary.
Is that your case? Do you need help deciding what to choose? Do not hesitate to contact me here.