[ This is a content summary only. Visit our website https://ift.tt/1b4YgHQ for full links, other content, and more! ]
by Arooj Ahmed via Digital Information World
"Mr Branding" is a blog based on RSS for everything related to website branding and website design, it collects its posts from many sites in order to facilitate the updating to the latest technology.
To suggest any source, please contact me: Taha.baba@consultant.com
In this article, you’ll learn how to turn your WordPress-driven site into a static site with just a handful of powerful tools.
Why would you do this? Because you can get insane speed gains and therefore boost your site’s performance in search engines, and also reduce (or eliminate) your hosting bill and dramatically improve your security.
Fantastic speedups are certainly no small feat, but that isn’t all you can get from turning your dynamic WordPress (WP) site install into a static one.
Let’s summarize:
WP developers follow good standards and security practices, although a long-term support (LTS) is still very much missing. However, because of its very architecture, there are things that are out of the WP Security Team’s hands and transferred directly into yours:
All of this is a constant process, and plugins are not a minor threat, specially unmaintained ones, as these often have security holes by which attackers take control of WP installations. That is precisely why it took Automattic, the company behind WP, years to accommodate WordPress.com (WP.com) — the commercial managed version of WordPress.org (WP.org) — to be able to offer some plugins.
WP could be secure with a fair amount of conscious effort. And while you could argue that these are efforts any decent developer should put in, it’s also true that you can potentially lift this weight off your shoulders by turning your WP site into a static one, and while doing so redefining its architecture and removing for good nearly all of the available spots that could turn into a security threat. After all, there isn’t much an attacker can do with plain HTML, CSS files and flat images.
However, you’ll still need to take care of cross-site scripting and cross-site request forgery. 🤷♂️
Provided: Netlify
We briefly reviewed static site generators (SSGs) on our list of 100 Jamstack tools, APIs and services to power your sites article, and there are tons more than we’ll cover here, so make sure to check StaticGen to learn more.
Some SSGs are specifically targeted at WordPress, such as WP2Static, but we’ll focus on a more general-purpose one, GatsbyJS — the “free and open source framework based on React that helps developers build blazing fast websites and apps”.
I’ll have to admit that, as much as I wanted this process to be dead simple, there are a number of things that could make it a little more cumbersome and time consuming, such as the existing plugins you may have installed (the fewer the easier) and the way in which you’ve formatted your posts (the simpler the better). Think of this as a guideline that you might need to adjust to your specific case.
Essentially, this is what we’ll do:
We’ll start by forking either the Gatsby Advanced Starter or the Gatsby Material Starter, both of which are tweaked general purpose primers for a GatsbyJS project, the second one with an “opinionated” Material Design template (demo).
Right off the bat these starters will get you a fully featured React-powered progressive web application (PWA) with all batteries included:
The claim is that after a successful migration and deployment to a CDN, your site should be so performant that an audit with Google Lighthouse should report the best results possible:

You’ll first need to install GatsbyJS and Node.js so that you can use the gatsby CLI and the Node.js packet manager npm. For Node.js just download and install, for GatsbyJS see the Quick Start or Set Up Your Development Environment.
Once you sort that out, this is how you start a project (remember you can also clone gatsby-material-starter):
gatsby new YourProjectName https://github.com/Vagr9K/gatsby-advanced-starter
npm run develop # or gatsby develop
The configuration for the Advanced (example) and Material (example) starters are pretty much the same.
As mentioned, there is Netlify CMS support right out-of-the-box which you can sync with your Git repository enable by editing static/admin/config.yml as follows:
backend:
name: github
branch: master
repo: your-user/your-repo
You can also integrate Netlify CMS with GitLab or Bitbucket (see Backend Configuration).
Continue reading How to Migrate from WordPress to a Static Site Generator on SitePoint.