Static WordPress-An Introductory Tutorial 
WordPress websites are generally hosted as dynamic website, but they are converted to static version by caching each page. These cached version of WordPress websites are called as static WordPress.
Static WordPress has several inherit advantages e.g. better speed (up to 25 times), lower maintenance costs, easy scalability and added power of WordPress Content Management System.
How Static WordPress Works?
Static WordPress is the process of generating the static version of (dynamic) WordPress website. This process consists of caching all the web content (HTML, JS, CSS, Images, PDF, etc.) of that WordPress website.
This cached version only works for those content which can be served statically, e.g. blog articles, and pages. It will not work with dynamic content e.g. user registration, comments etc.
Following this, there evolved the need for tools that can convert dynamic website content to static websites for easy and stress-free deployment. Several solutions have evolved in this arena both open source and commercial which are discussed in later section of this post.
What are the SEO Advantages of Static WordPress Website?
All web developers and content creators strive for Search Engine Optimization and better ranking on SERPs. There are some definite advantages of a have a Static Website, such as
1. Website Speed
Page speed is one of the ranking factor and Google like/tend to rank fast websites higher. On average, Static websites are 25x faster than their dynamic counterparts, so static websites tend to perform better for SEO.
3. Management and Maintenance
4. Security and Malware Attacks
Dynamic websites are easy victim of security and malware attacks and can have negative implications for a website SEO. With static website, you will almost eliminate those attacks as they are not inherently prone to malware attacks and have less security risks.
5. Best of Both Worlds
What are the Strengths and Weaknesses of a Static WordPress website?
Creating a static version of a WordPress website bring several advantages. There are also some WordPress features which will not work with static WordPress version. In later section of this tutorial, we will discuss the solutions for those disadvantages/cos of Static WordPress.
Following are some of the strengths and Weaknesses of a static WordPress Website.
What we like
- Improved Speed
- Better Security
- Highly Scalable
- Cost Saving
- Fewer Dependencies
What we did not like
- Doesn't Work With e-Commerce
- Default WordPress Comments do not work.
- Search doesn't work out of box.
- Contact Forms need to be redesigned.
- Static WordPress Deployment is a Complex Build Process
How to Manage Dynamic Content on a Static WordPress website?
Based on our years of experience with both (static and dynamic websites), we have prepared a list of points that one needs to consider before converting their WordPress website to a static website. This list should help you in deciding on choosing dynamic or static website for your next WordPress project.
WordPress contact forms are generally created using custom plugins such as Form 7. These forms do not work out of the box and need special treatment. Some websites do not necessarily need a contact us form, so they can ignore it or choose an external form service provider.
If you need a contact us form for your static WordPress website, then you can follow the method we mentioned in our post How to Configure WordPress Contact Us Forms on Netlify? This approach uses Netlify forms and will not work with other static hosting service providers.
WordPress comments also do not work with a Statically generated WordPress website. This is mainly due to the static nature of a newly created website.
To integrate comments into your WordPress static website, you can use third-party solutions like Disqus, Utterances, or Facebook comments. Most of these services can be easily integrated to a static website. You can also choose Utterances to avoid dependency on third-party services provided and have more control over the data and privacy of a visitor.
WordPress’ search for its static version will not work out of the box. If your static WordPress website needs search functionalities, then you have only limited options. You can choose to integrate Google Search into your website, or external service providers such as Algolia.
If you are on a budget and need a free solution, then you can embed JS-based search functionalities into your website. This functionality can be included with JS libraries, e.g. Tipue Search or Lunr.js. You can see our detailed post on how to achieve this.
Statically hosted WordPress sites are generated using custom plugins, e.g. WP2STATIC. These static sites do not create .htaccess to establish redirects rules. You need to create those files manually, e.g. for Netlify we can create a netlify.toml file and include it in the root folder of your website before hosting it on a server.
Most of the static site generation plugins for WordPress will use meta tags for redirects, which is a bad choice for Search Engine Optimization (SEO).
404-Page redirects are managed at the hosting level and one should not worry about them. You just need to include a 404.html page on your Website root folder, if you want a custom 404 response.
A customized 404 Page can bring a better and improved user experience and can be easily configured as mentioned in our post on How to configure 404 Error page for WordPress Static Website on Netlify?
Ajax requests also do not work out of the box with a Statically Generated WordPress Website. However, some hosting service providers offer solutions to this problem through extended functionalities with their paid and free plans.
Netlify functions, AWS Lambda and Cloudflare Workers are some of the solutions to achieve this. A developer should still write code for those functions to make your Ajax calls. All tough using these functions might be free in a basic tier but can eventually increase your production cost.
Static WordPress Site Generators
There are lots of popular static WordPress Site Generators, both Commercial and Open Source. The availability and adaptability of these tools depends upon several factors, which are discussed in detail.
This is a work-in-progress Open Source software by seowings.org website and will be available shortly. This software converts any WordPress website to a Static Website and then uploads it to an online git service e.g. GitHub, GitLab, or Bitbucket.
Probably one of the most popular solutions available in the market with a versatile plugin ecosystem. This tool can be installed within WordPress and can be fine-tuned for individual needs.
WP2Static by Strattic – Image Credits are with strattic.com [Image Credits: Faisal Shahzad (SEO Wings)]
This plugin is not actively maintained and was recently dropped from WordPress plugin repositories. In our tests, we also notice several bugs e.g. Pagination, Search Bar etc.
This plugin only works when installed inside WordPress, which means one needs to have a working installation of WordPress either locally or remote. We have prepared a compiled version of this tool for our community, which you can download directly from our download section.
Recently, simply static has started getting huge popularity. This is mainly attributed to its free and easy availability in the WordPress plugin ecosystem. In our tests, we noticed that this plugin is much cleaner than WP2STATIC and is also being actively maintained. This plugin also requires an active installation of WordPress.
Simply Static – Image Credits strattic.com [Image Credits: Faisal Shahzad (SEO Wings)]
The pro version of this tool provided end to end WordPress solution, i.e. all dynamic components of WordPress can easily be configured with the pro version of this plugin.
HTTrack is one of the oldest ones in this niche and is actively used. This works independently of a dynamic content management system and hence works for any.
Httrack Website Copier – Image Screenshot from httrack.com [Image Credits: Faisal Shahzad (SEO Wings)]
This software can be installed on a local computer and then be used to download a static version of the website. It merely takes the HTML snapshot of the website and all links associated with that main domain. This tool can be configured or optimized as per the individual needs of a given project. This works perfectly fine for converting a dynamic WordPress website to a Static WordPress website.
Wget is another open-source project which can be used to take a complete snapshot of a website. This tool doesn’t require an active installation of WordPress and will work for any content management system as well as a simple HTML static site.
In Linux/Unix user community, this tool is quite popular and commonly used. This is a command-line tool, and it is used to modify as per individual needs.
Deploying a WordPress website as a static website could be daunting, especially if you are doing it for the first time. You can do it manually by yourself or use a third-party service provider which fully automates this work for you.
On seowings.org website, we provide tips and tricks to make your journey to static WordPress hosting a smooth ride. We recommend deploying your static website on Netlify, although there are other great options available
Hi, I am Faisal. I am working in the field of Search Engine Optimization (SEO) and Data Sciences since 2002. I love to hack workflows to make life easy for people around me and myself. This blog contains my random thoughts and notes on Digital Marketing, Affiliate Marketing, Static WordPress Hosting with Netlify and CloudFlare Pages, Python, Data Science and open-source projects.