| 开发者 | hakeemify |
|---|---|
| 更新时间 | 2026年9月16日 13:15 |
| PHP版本: | 8.1 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPL-2.0-or-later |
| 版权网址: | 版权信息 |
--user=<an administrator>; without it, the admin is not read and the scan
says so.
Plans before it acts. You get a preview: every change, its risk level, what
it touches, and the recovery point that will be taken. The same scan and the
same profile always produce the same plan.
Takes a recovery point first. Before anything changes, the current
configuration is captured. Before rows are deleted, the rows themselves are
captured, and the deletion does not run unless that capture completed.
Verifies, then rolls back if it has to. After applying, Debloater requests
your front page, a post, your dashboard and your REST API, and if one of them
fails, it puts everything back and tells you what failed. It also requests the
login page, and warns rather than rolling back if that looks wrong. When you
apply from the dashboard, it also asks a fresh request whether each change
loaded, and puts everything back if one did not. From WP-CLI the same checks run
as the administrator you name with --user=<an administrator>, and a failure
puts everything back there too. Without --user, or on a site that cannot make
requests to itself, these checks cannot run; the change stays, and Debloater
reports which checks could not run.
Adds nothing to a page when nothing is selected. With no changes selected,
a front-end page loads none of Debloater's change handlers and makes no query
to Debloater's own data.
Three profiles
wp debloater scan --check-plugin-updates, or the check_plugin_updates
parameter of the REST scan endpoint; the dashboard never does — Debloater asks
https://api.wordpress.org/plugins/info/1.2/ for the last-updated date of each
installed plugin, one request per plugin, so it can tell you which look
abandoned. Each request names the plugin's slug, and its user agent names this
site's address. Nothing else about your site is sent. The dates are cached, and
the choice is not remembered: the next scan does not ask unless told to. This
is WordPress's own API; see the
wordpress.org privacy notice.
The rules Debloater reasons with ship inside the plugin and are never fetched.
A newer set arrives when you update the plugin.
Nothing else leaves your server.
WP-CLI
wp debloater scan --user=
wp debloater findings
wp debloater preview --profile=safe
wp debloater apply --profile=safe --yes
wp debloater rollback --yes
wp debloater status
Exit codes: 0 applied and verified, 1 error, 2 rolled back, 3 applied with
warnings.
It removes work your site is doing. Whether that is measurable depends on what your site was doing to begin with. Debloater records before-and-after counts — requests, bytes, rows — on each change, and never reports a change as making your site faster.
After applying, Debloater requests your front page, a post, your dashboard and
your REST API. If one of them fails, it restores the previous state and reports
what failed. From WP-CLI, pass --user=<an administrator> so the checks that
need a signed-in user can run. If your site cannot make requests to itself, or
the change was applied from WP-CLI without --user, those checks are reported
as not run and the change stays in place.
Yes. Every apply creates a recovery point. You can roll back any of them from
"Changes & recovery" on the dashboard, or with wp debloater rollback.
Only when you choose a change that deletes rows. Those changes are never part of "Fix Safe Issues" or the other two profiles. The finding shows how many rows the scan counted. Before rows are deleted they are copied into a recovery point, and if that copy does not complete, nothing is deleted.
The changes Debloater applied stop, and it forgets which changes were applied:
if you install it again, it starts with nothing applied rather than turning them
back on. Rows a change deleted are not put back by uninstalling; roll the change
back first if you want them.
It deletes the files that hold recovery points larger than 8 MB, so those can no
longer be restored, and removes anything an older version left under
wp-content/. Exports you wrote under wp-content/uploads/debloater/ are left
in place. Its database tables and other settings are kept, including smaller
recovery points and the scan history, so after installing it again you can still
see what was changed and roll it back. A rollback puts the site back as it was
just before that change, so changes applied before it come back on too. There is
no setting to remove them on uninstall.
The changes you apply are stored in your database, not written as PHP files,
and nothing is added to must-use plugins.
Two things are written as files, both of them data, under
wp-content/uploads/debloater/:
backups/.wp debloater export and wp debloater profile export write their JSON
there, with a random suffix on the file name..htaccess refusing web access, which Apache honours; on
Nginx or another server, add your own rule to refuse
wp-content/uploads/debloater/. --file=- prints an export to standard output
instead, and a file path is refused.
No. There is no telemetry, licensing call or usage reporting. The requests it makes on its own go to your own site. The one request to wordpress.org happens only when you ask for it, and is described under "External services".
Debloater does not cache anything. Its command-line end-to-end check runs on a site with WooCommerce, Elementor, Contact Form 7, Rank Math and LiteSpeed Cache active.