Monday, July 4, 2022
HomeWordPress DevelopmentHow To Generate a Static Website From WordPress Utilizing Staatic

How To Generate a Static Website From WordPress Utilizing Staatic


A few years in the past, WPLift revealed an article titled “How one can Use a WordPress Static Website Generator to Make WordPress Static.” That article used the WP2Static plugin for example.

WP2Static has since been taken over by Strattic. It’s now not obtainable within the WordPress plugin listing, though you may nonetheless get it by way of the plugin web site.

Nonetheless, whereas Strattic introduced that it will proceed to keep up and help WP2Static, they’re a competing and industrial WordPress static internet hosting firm. Subsequently, the plugin’s future appears slightly haphazard .

Happily, a terrific different is now obtainable – Staatic – and I will likely be specializing in that at present. So, let’s bounce straight in.

What’s a Static Website?

To recap, when you haven’t learn the article talked about above, a static WordPress web site makes use of static slightly than dynamic content material. That minimizes server useful resource utilization, resulting in blisteringly quick web page loading instances. Moreover, static web sites are much less liable to malicious assaults than their dynamic counterparts.

You need to use static websites when you not often make modifications to your web site, and it doesn’t depend on dynamic content material (e.g., WooCommerce shops) the place issues are regularly altering.

Static websites are nice for issues like:

  • Primary portfolios
  • On-line resumés
  • Brochure-type web sites as utilized by marriage ceremony websites, small enterprise reminiscent of consultants, and so forth.
  • Primary blogs

Websites constructed utilizing WordPress are dynamic, however conversion to static is straightforward utilizing a plugin reminiscent of Staatic. The transformed web site will include HTML property, pictures, scripts, and so forth., however with WordPress and PHP stripped away. The result’s pages requested out of your web site are served instantly, eliminating the necessity for them to be generated on the fly.

Keep in mind that in case your WordPress web site makes use of plugins requiring dynamic server-side capabilities (reminiscent of types and searches), they received’t work on a static web site. A workaround for that is to switch the static web site to emulate the plugin or improve to a premium Staatic plan which incorporates options to alleviate this downside.

Key Options of Staatic

Given the unique WPLift article I discussed above centered on the free model of WP2Static, I feel it’s only honest that I stick to the equal model of Staatic for this text.

Article Continues Under

In its free guise, Staatic offers you the next key options:

  • A strong crawler that permits for quick transformation of your dynamic WordPress web site to a static one
  • A number of deployment strategies – for instance, Netlify, Amazon Internet Providers S3, CloudFront, native server (devoted or shared internet hosting), and so forth.
  • Extra URLs, paths, redirects, and exclude guidelines supported
  • HTTP redirects, customized “404 not discovered” web page, and different HTTP headers
  • Publish from the command line utilizing the CLI command
  • Appropriate with WordPress MultiSite and HTTP primary authentication protected WordPress installations

After all, the premium model of Staatic consists of lots extra performance, and I’ll talk about that later. Nonetheless, the free model is the proper start line for newbies to static WordPress web site creation.

Putting in and Setting Up Staatic

Firstly, I strongly recommend you learn by way of the plugin documentation, which supplies step-by-step directions on what you should do subsequent to put in, configure, and use Staatic.

Nonetheless, in easy phrases, the method is as follows:

1. Confirm system necessities and allow PHP extensions

To make use of Staatic, your supply web site must be operating utilizing WordPress 5.0 or larger. Moreover, the PHP model must be at the very least 7.0, though 7.4 is preferable because it consists of larger safety features.

Additionally, you will must verify 4 PHP extensions (Mbstring, Json, XML, and Zip) are enabled. The way you do this will depend on the admin instruments your web site internet hosting firm offers. For instance, in case your internet hosting supplier makes use of cPanel, you may entry the PHP extensions by clicking on ‘Choose PHP Model’ below ‘Software program.’

Location fo the 'Select PHP Version" option in GreenGeeks cPanel

When you click on on that, you will notice all obtainable extensions and whether or not they’re at the moment enabled.

PHP extensions in GreenGeek cPanel

2. Create a brand new (sub)area and database

As a brand new static web site will substitute your current one, the developer recommends making a clone earlier than continuing with the migration course of. This entails creating a brand new (sub)area and database for the cloned web site.

As with the PHP extensions, the way you do this will depend on the admin instruments obtainable to you. Within the case of cPanel, you create a brand new area (or subdomain) utilizing the ‘Domains’ possibility and a corresponding database utilizing ‘MySQL Database Wizard.’

Location of the Subdomains option in GreenGeeks cPanel
Location of the MySQL Database Wizard in GreenGeeks cPanel

3. Clone your WordPress web site

There are lots of methods of cloning your web site. The Staatic documentation suggests utilizing the free Duplicator plugin, obtainable within the WordPress plugin listing. Set up and activate that as you’d another plugin. Then, comply with the directions within the Staatic documentation to create the clone.

4. Limit entry to WordPress

The documentation recommends limiting entry to the WordPress model of your web site and suggests utilizing HTTP primary authentication to do this.

Establishing HTTP primary authentication is often carried out on the net server or internet hosting management panel stage. Apache is the generally used net server and requires you to create a .htpasswd file and replace the .htaccess file. Yow will discover a step-by-step tutorial on the TransIP web site that leads you thru this course of. Whats extra, it additionally has a .htpasswd generator.

5. Resolve in your static web site deployment technique

With Staatic, you may publish your static web site to the identical server at the moment internet hosting your WordPress set up (i.e., native listing,) or alternatively, you should utilize one of many supported cloud suppliers (reminiscent of Amazon Internet Providers or Netlify.)

Relying in your selection, you will want to evaluate the documentation relating to every deployment kind to see if any further preparation steps are vital earlier than putting in the Staatic plugin.

6. Set up and activate the Staatic plugin

Staatic is added to WordPress and activated in the identical means as another plugin. As soon as that’s carried out, a brand new menu merchandise will seem in your WordPress backend, providing you with entry to the plugin’s options:

Location of the Staatic item in the WordPress admin panel menu

7. Configure the plugin’s ‘Construct’ settings

The primary port of name is the ‘Construct’ tab of the Staatic backend menu.

Right here, you should enter the vacation spot URL of the location you want to publish, which might both be absolute, relative, or offline. It’s additionally attainable to specify further URLs, paths, and redirects that the static construct should embody or exclude.

A brief description of every possibility is on the market below every discipline within the Construct tab, whereas detailed explanations can be found within the ‘Construct Settings’ part of the documentation.

Staatic Build settings menus

8. Configure the ‘Deployment’ settings

Subsequent, you will need to configure the assorted deployment choices within the ‘Deployment’ tab.

A dropdown field offers the choices for the place to create the static web site: your native listing, Amazon Internet Providers, Netlifly, or Zip file.

The choices on this panel will fluctuate relying on the deployment technique chosen. Once more, the Deployment tab accommodates temporary explanations of every possibility, with extra detailed explanations obtainable within the ‘Deployment Settings’ part of the person documentation.

Staatic Deployment settings menus

9. Configure the ‘Superior’ settings

The ‘Superior’ tab lets you refine how Staatic works. It consists of choices like logging (for troubleshooting functions,) HTTP timeout and delay settings, and so forth.

On this panel, you will want so as to add the HTTP Authentication particulars, assuming you took the developer’s recommendation and arrange HTTP primary authentication to forestall public entry to your WordPress web site.

Earlier than doing something with the superior settings, I strongly recommend you learn the ‘Superior Settings’ part of the person documentation

Staatic Advanced settings menus

10. Create your new static web site

Upon getting made all of your configurations within the Construct, Deployment, and Superior tabs, all you should do is click on ‘Staatic’ within the very high bar of your WordPress admin panel and select ‘Publish’ from the dropdown:

Location of the Staatic publish static site publish button in the WordPress admin panel top bar in

After just a few moments, the brand new static web site is created, and a Publication Abstract will seem:

Staatic Publication Summary displayed in the WordPress admin panel after a static site is published

And right here is the static web site as revealed:

Example of a static site published with Staatic

Staatic Premium Plans

The free model of Staatic consists of loads of nice options that will likely be enough for a lot of customers. Nonetheless, the Premium plans convey significantly extra versatility to the desk, together with:

  • Types integration – removes the necessity to discover exterior kind dealing with options
  • Search integration – all posts and pages are saved listed and are searchable utilizing a neatly built-in search widget
  • Fast publications – Publishes solely the modifications made, thereby rushing up publication instances
  • Scheduled publications – you may publish your WordPress web site mechanically primarily based on a predefined schedule or occasion.
  • In depth API – permits these of you with sufficient coding information so as to add your personal customized options

At present, Self-hosted plans value €9 per thirty days for the Starter bundle, which covers one web site, and €29 per thirty days for the Enterprise bundle, which covers as much as three websites and consists of a number of crew members, precedence help, and a 99.95% assured uptime service stage settlement (SLA).

Cloud-hosted plans value €19 per thirty days for Starter and €69 for Enterprise.

If you happen to want limitless websites, self and cloud-hosted Enterprise plans are additionally obtainable, the value of which requires a dialogue straight with Staatic’s gross sales crew.

A 14-day free trial of the premium plans can be obtainable, and refreshingly, you don’t want a bank card to avail of that.

Get Staatic Premium Get Staatic Free

Staatic Professionals and Cons

As with all plugins and software program, Staatic has each good and unhealthy factors:

Professionals

  • The free model accommodates enough options for a lot of purposes
  • Premium plans are good worth and embody many helpful further options
  • As soon as configured, you may create blisteringly quick static websites with a single click on
  • Complete documentation

Cons

  • Whereas the documentation is nice, it may gain advantage from the addition of some visible content material, reminiscent of screenshots
  • Whole novices could battle with among the setup, which includes working within the net server or internet hosting management panel
  • Group help is proscribed as Staatic remains to be comparatively new to the market

The Remaining Verdict

Following the sudden demise of WP2Static, Staatic’s static web site generator has come at exactly the best time to supply a viable different. The provision of a fully-fledged free model is nice information for individuals eager to dabble with producing static variations of their WordPress websites. On the identical time, the premium plans are perfect for these craving extra performance at a smart worth.

So, if you wish to generate a super-fast static model of your WordPress web site, the Staatic plugin checks all the best bins.



How To Generate a Static Site From WordPress Using Staatic – Static Site Generator

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments