Turning your WordPress site to a static site.

Hi everyone, I hope everyone reading this is doing well and keeping safe?. We are currently going through some trying times that have seen businesses suffer losses (especially small businesses and employees working from home). However, things seem to be in control in Switzerland and various businesses have started opening up as usual. In today’s blog, I will be discussing about turning WordPress site to Static site. So keep reading!

I am pretty sure that most WordPress owners will be wondering if it is possible to get a static version of their site that runs faster. Well, good news! I just discovered It is very possible to achieve this if you had a site that doesn’t require much. For instance, eCommerce site, database, or large organization site with hundreds of pages to load.

What is a static site?

A static site is a site that is served just as it is stored in the server. Static sites normally consist of prebuilt files such as HTML, CSS, Javascript. Unlike dynamic websites that are dynamically generated with each incoming request from the server. Take scotch.io site for example, which is served as both dynamic and static sites. Due to the light nature of static sites, they usually tend to run really fast with good speed performance.

Generating Static site from WordPress

If your website is dynamic, you can use a static generator to convert the files to run as a static site. There are currently some very good open source generators out there such as:

For WordPress site, an easy option is to use a static site generator plugin such as WP2Static. From my experience, WP2Static have proven very good in converting WP sites into static sites. You can generate the files directly from your WP dashboard and save it in your local environment, or deploy it directly in Github.

Deploying in GitHub Pages

If you have a GitHub account, you will need to create a repository (with a readme file) that will host your static files. Once you create the repository and the branch to hold the files, you can then go into the WP2static menu in the dashboard and generate/deploy the static files after set up.

And voila! If you are able to run your WordPress site as a static site, you might not need to pay a dim for web hosting as long as it is a simple website. Just get a domain name and transfer it to point to your Github site. Isn’t that great 🙂