Linux 软件免费装
Banner图

Serve Static - Automatic WordPress Static Page generator

开发者 rajinsharwar
更新时间 2025年2月9日 04:00
PHP版本: 7.4 及以上
WordPress版本: 6.7
版权: GPLv2
版权网址: 版权信息

标签

caching cache html performance static website generator static site WP cache Serve Static

下载

2.2 1.1 2.0 1.0.4 1.0.1 2.3 1.0.2 1.0.3 2.1 2.4

详情介绍:

Serve Static provides a very efficient, simple and fast way of implementing static page caching in WordPress. It will generate static HTML copies of your webpages which will be then served using your server rewrite rules. This feature will bypass the whole PHP process and render only a simple HTML file without having to interect with the PHP, or MySQL for getting your page's design or content. This plugin is really handy and helpful if your webpages are mainly static, like websites of Blogs, portfolios, company portfolios, service, and many more. This plugin doesn't support any dynamic content caching, that means, all none of your dynamic content will be showing in the frontend, rather, a static version of that content will be showing. This plugin also comes with home-made HTML, CSS and JS minification features, which you can use to auto-minify the static files. This ensures more lightness of the HTML pages, and more boost to your page speed. Also, you can auto-warm the cache using the Warm feature, which will stimulate a visit on all your pages, to create the static files before they are served to your visitors.

安装:

  1. Unzip the downloaded package.
  2. Upload serve-static.zip to the /wp-content/plugins/ directory
  3. Activate the plugin through the 'Plugins' menu in WordPress
  4. Optional: You may need to modify the rewrite rules.

常见问题:

What does Serve Static do?

Serve Static generates static (HTML) copies of your WordPress pages. And then serves them to your visitors instead of requesting anything from PHP or MySQL for the page content. It works a bit like a web crawler, starting at the main page of your website and looking for links to all other published pages/posts/custom posts etc to create static HTML copies of. It also includes any CSS & JS files as well.

Who should use Serve Static?

Pretty much everyone who has even one Static page in their website. We beilive there isn't any much need of requesting to PHP for static pages.

Who should not use Serve Static?

If someone bielives they have all the pages as dynamic in their website, then this plugin is not for them. This is fully made for Static webpages, and with dynamic content, it does not work in anyway. Also, a website that heavily relies on ajax to update content in real-time, isn't a good fit with this plugin. We are brainstorming some ways we can get this convered, so feel free to share your thoughts with us in a support thread!

How do I set up Serve Static?

Simply install and activate the plugin, and configure it's settings, and you will be having Static pages on your website served! We do not want you to think technical, so we made it the most user-friendly possible. Your suggestions are always welcomed!

Will this plugin interfere with other caching plugins?

Well, if configured correctly, it will not interfere with any caching plugins! We do have features like HTML minify, CSS and JS Minify. So do not enable those options if you have enabled these minifications from any other caching plugins. For any reports of incompitability, please post in support thread! I will try to update the plugin accordingly to ensure maximum compitability. Serve Static creates a static copy of your website, which is just a collection of files: HTML, CSS, and JS. Any functionality that requires PHP code will not work with that static version. That includes, but is not limited to: blog post comments, contact forms, forums, membership areas, and eCommerce.

How is Serve Static different from cache plugins?

Cache plugins -- such as W3 Total Cache or WP Super Cache or WP Rocket -- make your existing WordPress site faster by caching pages as they're visited. This makes your site much faster but still makes that call to PHP or MySQL. This plugin ensures some call to PHP or MySQL is made to get the page content. Serve Static creates a static copy of your WordPress pages that is intended to be used completely separately from your WordPress installation, PHP or MySQL.

Can I enable cache save for logged-in users?

Caching is by default completely disabled for Loggedin users because of compatibility issues. Still if you would like to enable caching, we have a couple of filters for that. Use "serve_static_enable_logged_in" filter to enable cache save as a logged-in user. By default as an Administrator. Example: add_filter( 'serve_static_enable_logged_in', function( $value ) { return true; } ); Use "serve_static_logged_in_role" filter to change the type of user used to generate the cache as logged-in. This filter won't work if you don't have the used the "serve_static_enable_logged_in" filter already. By default, it's value is Administrator. Example to change the cache generation as a logged-in Subscriber user: add_filter( 'serve_static_logged_in_role', function( $value ) { return 'Subscriber'; } ); Check this link to find the Text's you can use. Not applicable if you have custom User role: https://wordpress.org/documentation/article/roles-and-capabilities/#summary-of-roles

更新日志:

2.4 2.3