| 开发者 | migaweb |
|---|---|
| 更新时间 | 2026年10月6日 19:06 |
| PHP版本: | 8.1 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
wp-content/mu-plugins is only useful when another plugin moves itself in front of Blockary. The plugin does not write that file itself. You download it on the settings page and copy it into the folder by hand, for example with SFTP. The settings page shows the exact path. The loader runs the decision only while the plugin is active. Without the plugin it does nothing. When you delete the plugin, delete the loader file too. When the settings page shows "Outdated" for the load order, download the file again and replace the copy.
Recovery
If a rule locks you out, add this line to wp-config.php:
define( 'BLOCKARY_DISABLE', true );
The plugin then blocks nothing until you remove the line.
blockary to wp-content/plugins, or install the plugin from Plugins > Add New.The plugin reads the country from the Cloudflare header CF-IPCountry when the site runs behind Cloudflare. Without Cloudflare the plugin downloads the free "IP to Country Lite" database from DB-IP into wp-content/uploads/blockary and refreshes it once a month. See the section "External services".
No. The country lookup runs on your server. The plugin sends no visitor data to any service.
The plugin writes only the country database into wp-content/uploads/blockary. It removes that folder and its settings, bans, and log on uninstall. In the database, the plugin moves itself to the first position in the list of active plugins. The optional loader file in wp-content/mu-plugins is a file that you copy by hand. The plugin never writes or deletes it.
Add define( 'BLOCKARY_DISABLE', true ); to wp-config.php. The plugin then blocks nothing. Fix the rule on the settings page and remove the line again.
Not by default. A visitor with a valid login cookie passes the country rule and the bans. If your site has open registration, turn off the setting "Do not apply the firewall to logged-in users". The country rule and the bans then also apply to logged-in users. Administrators always pass, so that you cannot lock yourself out of the settings page.
The plugin now decides a request without a login cookie before WordPress loads the other plugins. A callback in a normal plugin is not registered at that moment. Put the callback into a must-use plugin (a file in wp-content/mu-plugins).
Yes. The plugin decides before WordPress loads the other plugins. A page cache that serves files before WordPress starts, for example a web server cache, can serve a cached page to a blocked visitor.