Documentation / Administrator Guide / Configuration / Advanced Settings

Advanced Settings

The Advanced Settings allow you to tweak and tune the way Staatic works.

Logging

This determines the verbosity of logging output during publications. Increasing the level of logging might help with troubleshooting, but impacts publication speed.

By default Logging is set to Minimal Logging. This is the recommended value in most cases. We recommend increasing the level of logging only while troubleshooting.

Work Directory

While publishing the static version of your WordPress site, a copy of your dynamic WordPress site is crawled and converted into static files. These files will be stored within the work directory. Also depending on the Staatic features and deployment method you are using, other temporary files will be stored here.

By default the Work Directory is set to a sub directory of wp-uploads. Depending on filesystem permissions another directory may need to be chosen.

Page Not Found Path

This is the page that will be crawled to define the (404) page not found page.

By default the Page Not Found Path is set to /404_not_found/. If you have a specific 404 page on your dynamic WordPress site, e.g. /my_custom_404.html, then feel free to change the path here.

Network

At various stages during a publication Staatic will need to perform HTTP requests, e.g. to crawl your dynamic WordPress site or to query our API to enable form handling or search. These settings can be changed to improve publication performance as well as limit the load on your server.

HTTP Timeout

By default the HTTP Timeout is set to 60 seconds. This should work in most circumstances. If your experiencing problems, you can increase the value.

HTTP Delay

By default the HTTP Delay is set to 0 milliseconds. In case the value is set to anything above 0, requests will be delayed by this amount of milliseconds.

This can be used to decrease load on the server that hosts your dynamic WordPress site and can be useful on shared servers with multiple sites where the performance of other sites would otherwise be affected negatively.

HTTP Concurrency

By default the HTTP Concurrency is set to 4 concurrent HTTP request. In order to significantly increase the publication performance, you can increase this value.

Be careful not to set this value too high or it may negatively impact the overall server performance. Depending on the specifications of the server any value between 1 and 8 should be safe.

Downgrade HTTPS to HTTP while crawling site

By default the Downgrade HTTPS to HTTP is disabled. Enabling this option will cause internal crawl requests from Staatic to the WordPress instance to be forced over the HTTP protocol.

This option can be enabled in cases where WordPress is behind a HTTPS terminating load balancer. This is only an issue when WordPress itself is not directly available via HTTPS (the external load balancer takes care of that) and the site address resolves to this local WordPress instance that only accepts HTTP.

HTTP Authentication

If you are using HTTP (basic) authentication to restrict access to your dynamic WordPress installation, Staatic requires a valid username and password combination. Otherwise it is unable to crawl your dynamic site successfully.

Note: we highly recommend that you setup a dedicated account for Staatic. This is to prevent Staatic from failing when a regular user makes any changes to his/her username or password.

Username

The username for the HTTP authentication.

Password

The password for the HTTP authentication.

SSL Certificates

These settings determine if and how SSL certificates are verified during requests.

Verification

This setting describes the SSL certificate verification behavior of a request.

  • Set to “Enabled” to enable SSL certificate verification and use the default CA bundle provided by operating system.
  • Set to “Disabled” to disable certificate verification (this is insecure!).
  • Set to “Enabled using custom certificate” to provide the path to a CA bundle to enable verification using a custom certificate.

By default the SSL certificates Verification behavior is set to “Enabled“. If your server is using self signed certificates, either change its value to “Enabled using custom certificate” or “Disabled“.

Note: setting the value to “Disabled” disables SSL certificate verification completely and is insecure. Use with caution!

CA Bundle Path

This setting is only relevant in case “Verification” is set to “Enabled using custom certificate” and should be the path to the certificate, e.g. “/path/to/cert.pem“.

Crawler

These settings allow you to change certain aspects of the crawler component. The crawler component is responsible for crawling all pages and assets of your dynamic site and prepares these for further processing.

HTML DOM parser

The HTML DOM (Document Object Model) parser is responsible for understanding and manipulating the HTML structure of posts and pages in order to allow the static version of your site to be generated.

Due to the nature of the HTML DOM, different HTML DOM parsers all handle HTML slightly different and also vary in performance. In order to support as many cases as possible, Staatic supports multiple external libraries.

  • HTML5-PHP
    HTML5-PHP is a standards-compliant HTML5 parser and writer. It is stable and used in many production websites.
  • PHP DOM Wrapper
    PHP DOM Wrapper is a simple but powerful DOM wrapper library to traverse and manipulate HTML documents.
  • Simple Html Dom Parser
    Another popular HTML DOM parser, having the ability to leave unmanipulated parts of the HTML DOM as much as is, when it comes to non-wellformed HTML code and HTML entities.

By default, since Staatic for WordPress v1.4.0, HTML DOM parser is set to PHP DOM Wrapper. Up to v1.3.4 the default (and only supported HTML DOM parser) is Simple Html Dom Parser.

According to our benchmarks, HTML DOM parser performed better when processing large sites. If you are experiencing issues with the generated static HTML, you can try a different parser.

Note: if you are using Alpine.js shorthand syntax in your HTML, you will need to use Simple Html Dom Parser in order for the @event attributes to be retained.

Process page not found resources

By default Process page not found resources is disabled. When enabled, in addition to the configured page not found page, other resources with a 404 status code will be included in the build as well.

In most cases having a single 404 page not found resource deployed is sufficient, since this is usually configured to be the shared 404 page used by the web server. In case you have unique 404 pages for specific URLs, you can enable this setting to have them processed and deployed as well.

Publication Task Timeout

This setting determines how long individual publication tasks may take before timing out and only applies to publications started from within WP-Admin. Publications started using WP-CLI are less constrained and usually not time limited.

By default the Publication Task Timeout is set to 300 seconds.

Take the following into consideration when changing this value:

  • If set too high, publications may fail due to web server timeouts (request timeout).
  • If set too low, publications may fail due to long running tasks timing out.

Note: only change this value to troubleshoot publication issues. Alternatively use the WP-CLI Publish Command.

Plugin Uninstall

These settings allow you to change which data is deleted when uninstalling the Staatic plugin. If you want to uninstall the plugin and are not planning to reinstall the plugin at a later time, you can enable all options below.

Delete plugin settings

When enabled, this will make sure all of the plugin’s settings and options registered with WordPress are deleted when uninstalling the plugin.

Delete plugin data

When enabled, this will make sure all of the plugin’s database tables are deleted when uninstalling the plugin.

Note: The Work Directory needs to be deleted manually at the moment.