Staatic – Static Site Generator

描述

Staatic lets you create and deploy a streamlined static version of your WordPress site, enhancing performance, SEO, and security simultaneously.

Features of Staatic include:

  • Powerful Crawler to transform your WordPress site quickly.
  • Supports multiple deployment methods, e.g. GitHub, Netlify, AWS (Amazon Web Services) S3 or S3-compatible providers + CloudFront integration, or even your local server (dedicated or shared hosting).
  • Very flexible out of the box (allows for additional urls, paths, redirects, exclude rules, etc.).
  • Supports HTTP (301, 302, 307, 308) redirects, custom “404 not found” page and other HTTP headers.
  • CLI command to publish from the command line.
  • Compatible with WordPress MultiSite installations.
  • Compatible with WPML (multilingual) installations.
  • Supports HTTP basic auth protected WordPress installations.
  • Various integrations to improve compatibility with popular WordPress plugins.

Depending on the chosen deployment method, additional features may be available.

Staatic Premium

In order to support ongoing development of Staatic, please consider going Premium. In addition to helping the authors maintain Staatic, Staatic Premium adds additional functionality.

For more information visit Staatic.

屏幕截图

  • Use your WordPress installation as a private staging environment and make all of the modifications you need. Then publish these changes to your highly optimized and consumer facing static site with the click of a button.
  • Monitor the status of your publications while they happen and review details of past publications to easily troubleshoot any issues.
  • Configure and fine tune the way Staatic processes your site to suit your specific needs.

安装

Installing Staatic is simple!

Install from within WordPress

  1. Visit the plugins page within your WordPress Admin dashboard and select ‘Add New’;
  2. Search for ‘Staatic’;
  3. Activate ‘Staatic’ from your Plugins page;
  4. Go to ‘After activation’ below.

Install manually

  1. Upload the ‘staatic’ folder to the /wp-content/plugins/ directory;
  2. Activate the ‘Staatic’ plugin through the ‘Plugins’ menu in WordPress;
  3. Go to ‘After activation’ below.

After activation

  1. Click on the ‘Staatic’ menu item on the left side navigation menu;
  2. On the settings page, provide the relevant Build & Deployment settings;
  3. Start publishing to your static site!

常见问题

How will Staatic improve the performance of my site?

Staatic transforms your dynamic WordPress site into a streamlined static site. Starting at the homepage or a designated URL, Staatic uses a web crawler to methodically navigate through every link, post, and page. As it moves through the site, dynamically generated content is captured and converted into static HTML files, while simultaneously fetching related assets like images and scripts.

By eliminating both WordPress and PHP from the delivery process, pages from your site are served instantly, bypassing the delay of on-the-fly generation. This guarantees the quickest possible load times and significantly reduces the time to first byte (TTFB), offering an unparalleled browsing experience for your visitors and enhancing your site’s SEO positioning.

Why not use a caching plugin?

Caching plugins boost site performance by storing data for quicker access, yet they don’t fully bypass WordPress, introducing some latency. Additionally, after every update, these plugins need cache prewarming to serve the first requests quickly. In contrast, static sites are always ‘warmed up’, ensuring consistently rapid load times.

Furthermore, with Staatic, you gain the flexibility to host your site on any platform of your choice. This means you could opt for an ultra-fast cloud provider or a robust content delivery network, further amplifying your site’s performance and ensuring optimal user experience.

Will the appearance of my site change?

No, it shouldn’t. However, if there is a difference in the static version of your site, it might be due to invalid HTML in your original WordPress site that couldn’t be accurately converted. In such instances, consider checking your HTML’s validity using services like the W3C Markup Validation Service.

How will Staatic improve the security of my site?

By converting your site into static HTML pages, you substantially minimize the potential attack surface. This strengthens your website’s security and reduces the ongoing need to update WordPress, its plugins, and themes constantly. As a result, you can enjoy greater peace of mind, knowing your site is resilient to most threats.

Is Staatic compatible with all plugins?

Not entirely. When your site undergoes conversion to a static format, dynamic server-side functionalities become unavailable. As a result, plugins relying on these features – such as those processing forms or fetching external data – might not function immediately or might be unsupported altogether.

To accommodate such features, adjustments or alternatives may be necessary. Alternatively, you can opt for Staatic Premium, which seamlessly integrates some of these functionalities. For detailed insights, visit staatic.com.

Will Staatic function on shared or heavily restricted servers?

Staatic offers broad compatibility, only requiring the permissions to write to the working directory and to initiate an HTTP connection with your dynamic WordPress installation.

Where can I get help?

If you have any questions or issues, please have a look at our documentation and FAQ first.

If you cannot find an answer there, feel free to open a topic on our Support Forums.

Want to get in touch directly? Please feel free to contact us. We will get back to you as soon as possible.

评价

2024 年 10 月 5 日 1 回复
I’ve been trying to convert my sites to static HTML for a while now and after trying many different plugins and other techniques. I have to say, this is the best and easiest way to convert a WordPress site to static HTML.I love that this plugin is being actively maintained so here are is a feature suggestion I think would make Staatic even better: Incremental pushes to GitHub.
2024 年 6 月 16 日
I’ve been using the Staatic plugin for a while now, and I have to say, it’s awesome! If you’re working with WordPress and looking for a way to speed up your site, this plugin is a game-changer. Setting it up was super easy. The plugin fits right into WordPress without any fuss. The interface is user-friendly, and the documentation is clear, so I had it up and running in no time. What really stands out is how much faster my websites load now. By turning everything into static HTML, Staatic has made my sites lightning-fast. Visitors get a much better experience, and my SEO rankings have improved too. Plus, my server isn’t bogged down anymore, which is great during high traffic times. Staatic is also really flexible. Whether you’re dealing with a small blog or a big, complex site, it handles everything smoothly. I love the customization options that let me tweak how the static site is generated to fit each project perfectly. The integration with deployment platforms like Netlify is fantastic. It saves me a ton of time because everything is automated. My sites stay updated with the latest changes from WordPress without me having to lift a finger. And let’s talk about support – the Staatic team is amazing. Anytime I’ve had a question or needed help, they’ve been quick to respond and super helpful. They keep rolling out updates and new features, which shows they’re dedicated to making the plugin even better. Overall, if you want to boost your WordPress site’s performance and security, Staatic is a must-have. It’s powerful, easy to use, and delivers great results. Highly recommend!
2024 年 5 月 7 日 1 回复
never seen a plugin that spontaneously broke after X amount of uses, well this one did. it causes a critical error after say 20 uses. I’m pretty sure its a deliberate ploy to get you to sign up to their premium tier upgrade version. well if it doesn’t work as intended with the demo what makes you think I’d actually upgrade? duhhh. should have thought that one through a bit better.
阅读所有17条评价

贡献者及开发者

“Staatic – Static Site Generator” 是开源软件。 以下人员对此插件做出了贡献。

贡献者

「Staatic – Static Site Generator」插件已被翻译至 2 种本地化语言。 感谢所有译者为本插件所做的贡献。

将“Staatic – Static Site Generator”翻译成您的语言。

对开发感兴趣吗?

您可以浏览代码,查看SVN仓库,或通过RSS订阅开发日志

更新日志

1.10.6

Release date: October 4th, 2024.

Improvements

  • Adds publication type to the publication list table and detail pages.
  • Extends support for relative file paths in selective publication with examples.
  • Introduces --merge option for the staatic publish command.
  • Expands MIME type support for optimizing generated web server configurations.
  • Updates external dependencies.

1.10.5

Release date: September 16th, 2024.

Features

  • Releases SFTP Server deployment method.

Improvements

  • Enhances compatibility of the “Downgrade HTTPS to HTTP” setting with Local.
  • Adds warnings for publication entry URLs that result in HTTP redirect responses.
  • Clarifies actions when site health checks fail due to loopback request issues.
  • Includes X-Staatic-Request header in crawler requests.
  • Updates external dependencies.

Fixes

  • Resolves issues with WP-CLI staatic command registration.

1.10.4

Release date: July 25th, 2024.

Improvements

  • Enhances support for lazy-loaded assets.

Fixes

  • Fixes a PHP scoping issue that prevented successful SFTP deployments.

1.10.3

Release date: July 4th, 2024.

Fixes

  • Fixes PHP scoping issue which may cause fatal errors.

1.10.2

Release date: July 4th, 2024.

Improvements

  • Enforces a publication time limit, which is set to four hours by default.
  • No longer automatically retries failed HTTP requests due to time-outs.
  • Shows sensitive publication log details only to users with settings permissions.
  • Halts publication immediately if the entry URL fails during crawling.
  • Updates external dependencies.

1.10.1

Release date: May 14th, 2024.

Improvements

  • Improves XML sitemap recognition.
  • Updates external dependencies.

Fixes

  • Restores global support for the data-srcset HTML attribute.

1.10.0

Release date: April 17th, 2024.

Improvements

  • Enhances the presentation of publication logs.
  • Improves overall compatibility with FlyingPress plugin.
  • The “Netlify” deployment method now waits for deploy to finish and provides deploy URL.
  • Expands HTTP client retry to include 502 Bad Gateway errors alongside 503 and 429 statuses.
  • Introduces staatic_publication_tasks filter hook to customize the publication process.
  • Various performance optimizations.
  • Updates external dependencies.

Fixes

  • Tightens fallback URL extraction to ignore adjacent non-URL characters.
  • Prevents the fallback URL extractor from clearing content upon encountering invalid unicode data.
  • Properly handles unexpected Guzzle HTTP exceptions.

Earlier releases

For the changelog of earlier releases, please refer to the changelog on staatic.com.