There are three different ways of generating a static The process of saving the files and data from your WordPress site to create a static site. in Simply Static. You should always start with a full static export to make sure all of your assets (Cascading Style Sheet. It’s a language used for describing the look and formatting of a document written in HTML./JS) and images are getting exported.
Once you did that, you may want to update specific parts of your website. The most common method to quickly update pages, post or any other custom post type are “Single Exports”.
Table of Contents
Start by editing a page/post. You will find a meta box called “Simply Static” which contains a couple of actions. The most obvious one is “Generate Static” which starts a static export of the current page.
Single Exports does not just update the single page/post you are exporting, instead, it will also update:
- assigned category and tag pages
- the blog page
- the homepage
- extract and export all images from that page
This should cover most of the places to update (overviews, latest article widgets, and so on).
Need more control? Or do you want to add additional pages and files? Well, we got you covered. Let’s talk about the second method of updating your static website implemented in Simply Static called “Builds”.
You can quickly create a new “Build” in Simply Static -> In the context of Simply Static, builds are the process of creating a static version of your WordPress website.. Builds allow you to add a list of URLs and file paths and export all of them with a single click of a button.
You can also assign Builds to posts, pages, or any other custom post type to include them in the export. This can be a good solution if you have custom overview pages that aren’t recognized by a Single Export or if you have to update specific files on each static export.
Generate static export on publishing a post
Sometimes you want to automate static exports even further and instead of clicking the “Generate Static” button within a post or page, you want to automatically export them once you publish a post. That’s why I created the following code snippet.
Add it to your functions.php or use the Code Snippets A piece of software that adds specific features to WordPress. to add it to your website and Simply Static will automatically trigger a single export once you publish a post/page.
Schedule static exports for updating your website
You may have a large website or a content team that publishes a lot of articles and adjustments in a week and you want to make sure your static website gets updated on a fixed schedule. Simply Static uses background processing and is entirely optimized to work with A function in WordPress that automates scheduled tasks, like publishing scheduled posts or checking for plugin updates..
With the following code snippet, you can schedule a static export (full export, builds export, single export):
That’s it. Now you should be familiar with all the ways of updating your static website with Simply Static.