How to convert a WordPress website into a static website in a few clicks

Sure, when we talk about static WordPress it seems cool and such, but complicated to do, but in reality there are ways to do it fast and easy.

What it is about is to convert a WordPress, dynamic, to HTML, static , which is what we are going to learn to do with this guide, in a very simple way.

Why would you want to make a WordPress website static?

There are many reasons that come to mind, but the main one is if we are talking about a website that is not going to have updates, or new content, or comments, that you simply want to continue existing, although without requiring attention and care on your part .

You might think, with good reason, that if the web is going to be static why do it with WordPress, but this answers itself: for convenience .

The great advantage of WordPress is that it allows you to quickly create attractive and complete websites with zero code knowledge, and any Internet professional, such as a marketer, can create websites for their campaigns, just with WordPress and a couple of plugins, without having You have to turn to the programming department or an external developer .

Yes, then, in a simple way, we can convert that website – already functional – to static, so that we do not have to maintain it, as a closed circle. The best of WordPress (speed and simplicity) without the worst of WordPress (having to maintain it) .

Advantages of a static website

Serving a static copy of your WordPress website has some advantages, and I have already pointed out some in the previous section, but I will summarize with these:

  • Speed : A static website does not have to query the database or resource repositories to display itself, it is always available. A static website is always faster than a dynamic website, period.
  • Performance : As it does not require any type of consultation, it is also optimal in terms of server resource consumption.
  • Security : As there are no dynamic elements or PHP code to execute, it is much easier to secure, since it does not depend on updates. You also won’t suffer from SQL injection attempts, remote dynamic executions, or the like. You practically only have to protect the file system.

Disadvantages of a static website

Basically the drawbacks of a static website is that you cannot offer everything that we are used to with dynamic CMS , that is:

  • Online store.
  • Forums.
  • Memberships.
  • Comments.

How do I make a WordPress website static?

What we have to achieve is to make a static copy of your website, which will be a collection of files: HTML, CSS, JS, images, etc.

For this we are going to use a plugin, Simply Static , very easy to use. Let’s go step by step, you will see how simple.

Install the plugin on the current WordPress website

The first step is to install the Simply Static plugin on the WordPress website that you want to make static .

There are no mysteries, install it like you would install any WordPress plugin .

Create the folder for temporary static files

Although it is not specified in the plugin documentation, you must cr
eate a folder for the temporary static files
, within the plugin installation folder.

So, from FTP or the file manager of your hosting create the folder static-files inside the directory of the plugin already installed so that the path is like this:

 / wp-content / plugins / simply-static / static-files / 

Run the Simply Static diagnostic

Once this is done, it performs a diagnosis of the plugin requirements from its settings page, in Simply Static → Diagnostics .

Configure Simply Static settings

Now, before starting to generate the static files, it is essential to configure the plugin settings, which you will have in Simply Static → Settings.

In the first screen, general settings, you must define where and how the static files will be saved .

  • Destination URL : Here you must decide between one of the available options. This setting will determine where the static web URLs go, so be aware of the final destination of static files.
    • Absolute URL – If you are going to create the static site in the same current domain where WordPress is installed.
    • Relative URL – If the static web will be created in a folder
    • Save to use offline – If you are only going to create the static copy to view the web on your local computer.
  • Delivery method : Here you can choose between a ZIP file, if you are going to download the files and then upload them to where you want (domain, subdomain, etc.) or local directory, if you want to store your static website in a folder on your server.
  • Local directory : If you chose this option in the previous setting, here you must indicate the path where they will be saved (in my case in a subdirectory that I created previously).

You can then configure what to include or exclude in the static copy , being able to add URLs that are not initially linked from your WordPress, as well as exclude links to WordPress own URLs, such as the access URL and others.

On the next screen, the advanced settings, you can specify the temporary files folder that we saw before , or even for large sites activate WP Cron so that the generation of static files is scheduled.

The next screen is only to restore the plugin settings to their default values, in case you mess with the configurations, it does not have more, only a button to do it.

Generate the static files of your website

If you have already reviewed all the above and in the diagnostics of the Simply Static plugin everything appears as correct, we can now generate the static version of the web .

You just have to go to the Simply Static → Generate screen and press the button « Generate static files »

Depending on the size of your website, it will take more or less, and at the end it will show you a complete record of the result .

Make the web static

Once you have generated the files, it will depend on the chosen delivery method and destination to finish having your static website.

In the example that I have been using for captures, the destination and method chosen was the local directory, in my case a subdirectory, so I would only have to visit it to check if the web has been created and works correctly. If you’re curious, this is the domain with the WordPress installation , and this is the subdomain with the static web generated with the plugin.

If you chose another local destination, and you want to replace the current installation with static files, you should upload the local files to the root directory of your WordPress website and delete the WordPress PHP files.

The same if the destination was a ZIP file, but in this case with the previous step of unzipping the file, otherwise it is the same.

The result will be that you will have your WordPress website complete but static .

Important checks before and after converting WordPress to static web

Always, to convert your WordPress website to a static website, I recommend you review the following:

  • If you are going to replace the WordPress website with its static version, do a full backup first (better from the hosting) in case you regret it at some point.
  • Once the static web is uploaded, check that all the links work perfectly.
  • The forms, if you did not exclude them, will still be there but they will not work , so you better delete any references / links to them.
  • In the files of the static web you will see that some typical WordPress folders still remain, such as wp-content and wp-includes . Do not delete them , it is not an error, the static web needs them because there will still be CSS files and images that it will use to function .
  • If something doesn’t go as expected, check the plugin’s settings. Most of the time the failures are due to an incorrect choice of the destination URLs and the local directory . Don’t worry, you can regenerate the static files as many times as you want , just delete the previous ones first.

It is surprisingly easy to turn WordPress into a static website. My last tip is to try a test domain first, but you’ll see that the process is surprisingly simple and efficient.

( 6 votes, average: 5 ) Rate this article to help improve the quality of the blog
Share on Twitter Share on Facebook Share on Pocket Share on LinkedIn Share on WhatsApp Share on Telegram

Did you like this article? You can’t imagine what you’re missing on YouTube !

About Us

We are BE OF THEM, a team specialized in the field of digital marketing and programming, our headquarters is in Germany, and our activity has expanded to reach all parts of the Middle East, especially the Arab Gulf countries.

Do you need to raise your site's score?

We have the perfect solution for marketing your business

Contact Us

Call us, or message us by email & whatsapp

We will be happy to talk to you, and knowing everything about your work.

All rights reserved, © 2021