| 开发者 | rajinsharwar |
|---|---|
| 更新时间 | 2025年2月9日 04:00 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 6.7 |
| 版权: | GPLv2 |
| 版权网址: | 版权信息 |
serve-static.zip to the /wp-content/plugins/ directoryServe 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.
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.
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!
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!
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.
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.
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