| 开发者 |
fernandot
ayudawp |
|---|---|
| 更新时间 | 2026年6月25日 03:06 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv2+ |
| 版权网址: | 版权信息 |
Coming from "Zero Config Performance Optimization"? This is the same plugin, now called DietPress and fully configurable. All your previous optimizations stay active by default; you just gained a settings page and a whole new set of WordPress-diet options.By default WordPress loads functions, services and scripts that most sites do not need. They slow down loading times and consume hosting resources. DietPress lets you trim that fat and apply battle-tested performance tweaks, with a clear description of what each option does and what might break, organized by risk level so you always know what is safe. TWO THINGS IN ONE PLUGIN 1. Performance optimizations (on by default)
dietpress_critical_css - Customize the inline critical CSSdietpress_critical_css_handles - Define which CSS handles are criticaldietpress_skip_defer_script_handles - Opt scripts out of the JavaScript deferdietpress_skip_defer_style_handles - Opt stylesheets out of the CSS deferraldietpress_preconnect_hints - Customize preconnect originsdietpress_dns_prefetch_domains - Customize DNS prefetch domainsdietpress_critical_fonts - Define critical fonts to preload.htaccess for a block marked # BEGIN DietPress with immutable Cache-Control headers<link rel="preload" ... fetchpriority="high"> pointing to your logo<style id="core-diet-critical-css"> in the headwpo-tweaks folder to /wp-content/plugins/.It is the same plugin, now called DietPress. All the performance optimizations you had are still active by default, so nothing breaks on update. On top of that you now get a settings page, individual control over every optimization, and a complete set of options to disable unused WordPress features.
Yes, if you want it to be. The performance optimizations are on by default, so you can just activate and go. The difference is that now you can fine-tune everything and, optionally, put WordPress on a diet by disabling features you do not use.
Nothing needs to be done by hand. When this plugin is active it detects the old "core-diet" plugin and deactivates it automatically (and core-diet 1.0.4 also steps aside on its own). Your settings are preserved because both plugins store them in the same place. The only thing left for you to do is delete the "core-diet" plugin whenever you like.
They were intentionally left out. The standalone DietPress (core-diet) included a few security toggles (disable XML-RPC, hide login errors, disable Application Passwords, hide the WordPress version, close pingbacks). Security belongs in a security plugin, where those protections are implemented properly and maintained as such; we recommend our free Vigilant. If you migrate with any of those toggles enabled, DietPress shows you a one-time notice listing them, and those features simply return to the default WordPress behavior.
The performance optimizations are designed to be safe and are tested across many sites. The diet options only change something when you explicitly enable each toggle, and every option has a description of what might break. If something fails, turn the toggle off; deactivating the plugin restores default WordPress behavior.
Yes. DietPress works alongside caching plugins and includes CORS and Vary headers for full CDN compatibility.
If a plugin or theme does not enqueue scripts correctly, the JavaScript defer may affect it; you can turn that option off or use the dietpress_skip_defer_script_handles filter. If you get a 500 error, edit your .htaccess and remove the block that starts with # BEGIN DietPress (or # BEGIN Zero Config Performance if you updated from 2.x and the rules have not been rewritten yet), or disable the ".htaccess server rules" option.
Yes. See the filters listed in the description (the dietpress_* hooks).