Cleaning up spam in a public XWiki

A practical guide to finding and removing spam pages and comments in an XWiki open to registration, then locking down registration and guest rights in infrastructure you control.

On this page

Cleaning up spam in a public XWiki: when the cleanup is urgent

Spam cleanup is urgent as soon as an open XWiki starts collecting junk pages and comments faster than your editors can review them. This usually happens on wikis that allow self-registration or guest edits, where bots create accounts and publish advertising, link farms or phishing pages in public spaces. Search engines may index those pages, your domain's reputation can suffer, and legitimate readers stop trusting the content. The work has two parts that must happen in order: remove the spam that already exists, then tighten the rules that let it in. Removing spam first without changing access only buys time until the next wave.

Two tools cover most of the removal work. The AntiSpam tools are the controls XWiki provides for flagging and blocking spam content, and the Admin Tools spam overview gives administrators a view of where suspect pages and comments sit across the instance. Before you start, confirm which of these extensions your installed version provides and how they are enabled, because the names and screens depend on the version you run. Your first decision is scope: decide whether you will delete everything created by unknown accounts in a given window or review items one by one, and record that choice so the cleanup can be repeated and explained later.

XWiki Standard is free open source software, and everything on this page applies to a self-hosted instance you run yourself, so no vendor subscription is needed to carry out the cleanup. Plan for the second part as well. Once removal is done, review the registration settings, the rights granted to guests and the default rights on public spaces, and confirm which of these changes your installed version exposes in the administration interface. Work out who in your organization approves those changes and who checks the result, because loosening rights later is easier to do by accident than tightening them is to get right.

Finding spam pages and comments with AntiSpam and Admin Tools

The AntiSpam extension screens new content on a wiki open to registration. It is where you tune detection and decide what happens to a suspect page or comment, such as holding it for review or blocking the submission. Before you rely on it, open its configuration in administration so you know which checks are active and which content types they cover.

  • Detection settings: Note which checks are enabled for pages, comments and registrations, and whether they run on every save or only on new content.
  • Handling actions: Record whether suspicious content is blocked, flagged or left for a moderator, because that decides what you will find later.
  • Word and link lists: Review any word, link or domain lists your team maintains, and remove entries that block legitimate content.
  • Server logs: Check the logs for AntiSpam messages to see what was rejected, which helps you find false positives.

Check that the detection settings match what your wiki should accept from guests before you start the cleanup, since a loose setting can bring back the same content after it is deleted.

Cleanup options and when each fits

This table compares four ways to remove spam from a public XWiki: deleting single pages, bulk removal by author, reverting page history and disabling comments. Read each row for when it fits, what it can take with it, and what to check in your instance first. The main takeaway is that the narrowest action that clears the spam usually protects legitimate edits best.

OptionWhen it fitsWhat it risks losingWhat to confirm first
Delete individual spam pagesA small number of spam pages with no legitimate edits built on them, such as a few junk pages in one space.Little, if the pages were created by spam and nobody else has edited them. Deletion moves pages to the recycle bin in standard setups, so restoration is possible.Confirm that the recycle bin is enabled and who can restore from it. Check page creators and last editors before deleting.
Bulk removal of a spam author's contentSpam came from one or a few registered accounts that created many pages or edits, and those accounts have no legitimate contributions.Legitimate edits by the same account, and pages where a real user later edited spam content. Overlooked pages may stay behind.Confirm the account's full contribution list, including edits to existing pages. Confirm that the account is not also used by a real contributor or a service.
Reverting pages to an earlier versionSpam was added to a legitimate page that otherwise has valuable content, such as a documentation page or a shared article.Good edits made after the spam was added, including corrections by other users, are lost when the page returns to an earlier version.Review the page history to find the last clean version. Confirm whether any later edits should be kept and reapplied by hand.
Disabling comments on affected spacesSpam arrives through comments or the comment feature is the entry point, and you need to stop new spam while you clean up.Legitimate comments and feedback stop being accepted in that space until comments are turned back on. Existing spam comments remain unless removed separately.Confirm how comments are enabled in your version and whether the change applies per space or per wiki. Confirm who must be told about the pause.
Removing spam comments individuallySpam comments sit on otherwise legitimate pages and the comment thread is mostly valid.Very little, provided you check that the removed comments are only spam. Comment threads may lose replies that quote removed content.Confirm how comments are stored and whether removal is reversible in your setup. Check replies before deleting a parent comment.
Locking editing or restricting guest rightsNew spam keeps arriving from guests or unverified accounts while the cleanup is still in progress.Anonymous contributions that some public users depend on stop working. Changes affect every page the rule covers, not only spam targets.Confirm which rights apply at the wiki, space and page levels. Test the change with a guest account before relying on it.
Blocking or deleting spam accountsThe spam comes from accounts that create no legitimate content, and you want them unable to log in again.Accounts that are also used by real people, and any content those accounts own if deletion removes linked pages.Confirm how account deletion treats the content created by that user. Prefer disabling accounts first if you are not sure.

Cleanup sequence from backup to verified removal

The sequence protects the wiki before anything is deleted, stops new spam while the cleanup runs, and ends with proof that spam is gone and legitimate content is intact. Each step has a check, so the team can show the result rather than assume it.

  1. Take a database and file backup first

    Before any page or account is touched, the administrator takes a consistent backup of the XWiki database and the file store that holds attachments. Take it with the wiki's services stopped or in a quiet window, so the database and attachments match. Keep the backup outside the instance and record where it is stored. Done means a restore test on a separate copy opens the wiki, shows recent pages and returns the attachments. Ask your database and infrastructure team to confirm the exact backup method for your database type.

  2. Freeze new registrations and guest edits

    Turn off self-registration and restrict guest rights so no new spam accounts or pages appear while the cleanup is running. Record the current registration and guest settings first, so you can compare them with the final state later. The change is done when a test visitor cannot register or edit as a guest and the settings show the new values. Note that changes made here are temporary until the hardening step confirms the long-term configuration.

  3. Identify spam accounts and content

    Use the AntiSpam tools and the Admin Tools spam overview to list suspicious user accounts, recently created pages and comments. Sort by creation date and author, and compare against the registration window when the wiki was open to the public. Mark each item as spam, legitimate or unclear, and keep a written list with page names and account IDs. Done means every flagged item has a decision, and unclear items have an owner to check them with the business units that use the content.

  4. Remove or revert spam pages and accounts

    Delete confirmed spam pages and comments, and disable or delete spam accounts. Where spam was added to a page that also holds legitimate text, revert the page to a version from before the spam using the page history instead of deleting the whole page. Record each action against the list from the previous step. Done means each item on the list shows its final state, and no unreviewed item remains in the spam overview.

  5. Check that legitimate content is intact

    Sample pages across the spaces that existed before the spam wave, along with pages whose history was reverted, and confirm the text, links, attachments and permissions match what the owners expect. Ask a content owner from each affected space to review their pages. Done means each owner confirms their content is complete, and any broken links or lost attachments are logged and restored from the backup taken in the first step.

  6. Confirm the spam overview is empty

    Return to the Admin Tools spam overview and the AntiSpam tools, and confirm that no flagged pages, comments or accounts remain. Save a dated screenshot or export of the empty overview for the change record. Done means the overview shows no open items and the change record lists every action taken. If items reappear, return to the identification step, because spam may have been missed or a page was restored from an infected version.

  7. Tighten registration and guest rights

    With the cleanup verified, decide the long-term registration and guest settings with the security owner, then apply them and document the reasons. Choose whether new accounts need approval, whether guests can edit, and which spaces stay public. Test the final configuration with a new test account and a guest session. Done means the test results and the approved settings are stored with the change record, and the team knows who reviews new registrations going forward.

Tightening registration and guest rights afterwards

Once the spam is removed, the registration and rights settings decide whether it comes back. The decisions below close the open paths spammers used, and each one costs something for legitimate contributors, so choose them deliberately and test them with a real new-user account before announcing the change.

Disable open self-registration

Turning off self-registration stops anyone from creating an account on the wiki. The trade-off is that new employees, partners and customers now wait for an administrator to create their account, which adds friction and a support queue. If you keep registration open, add an approval step so each new account is reviewed before it can edit. Check the registration settings and confirm with your XWiki version which options are available.

Remove guest edit and comment rights

Guest rights let anonymous visitors change pages or post comments, which is the most direct route for automated spam. Removing them means every edit is tied to a named account, so spam can be traced and blocked by user. The cost is that occasional readers who used to correct a typo must now log in first. Review the global rights for the guest group and any space-level grants that reopen the same access.

Restrict edit rights per space

Instead of one global setting, grant edit rights only in spaces where contributors need them, and keep read access broad where the content is meant to be shared. This limits the damage a compromised or spam-prone account can do, but it means someone must maintain the group membership for each space. Document which group owns each space so requests for access do not pile up on the administrator.

Enable email verification

Requiring a confirmed email address before an account is active raises the cost of mass account creation, since each account needs a working inbox. Confirm that your instance can send mail from its own mail server and test the confirmation link end to end. The trade-off is that users on restricted networks or with unusual mail policies may fail to finish registration, so give them a documented support route.

Review administrator and script rights

Spam cleanups often reveal accounts or groups that gained broad rights over time, including script rights that allow executing server-side code. Remove rights from accounts that no longer need them, and limit script rights to a small, named group. Expect some pushback from teams that rely on macros, so confirm each grant with its owner before removing it and record the decision.

Check spam guards after tightening

After changing registration and rights, verify that the AntiSpam settings still match the new model, because a lighter rights model can make some checks redundant or leave gaps. Repeat the Admin Tools spam overview for a few weeks and compare new spam against the settings you changed. If legitimate edits are being blocked, adjust one setting at a time so you can see which change caused the problem.

How the cleanup moves from backup to tightened access

The cleanup starts with a backup taken before anything is deleted, then registration is frozen so new spam stops arriving while the sweep runs. Spam is located with the AntiSpam tools and the Admin Tools spam overview, and each item is either removed or reverted from history. Before registration and guest rights are tightened, legitimate pages should be checked so real content is not lost. The final step is a retest from an unauthenticated session to confirm that the new settings hold.

Cleanup sequence from backup and registration freeze through retest of tightened access.

Limits to confirm in your environment before cleanup

Spam cleanup depends on what your XWiki instance can actually do, so confirm these limits before you plan the work. Each one changes which tools you can use, how far your search reaches, and whether deleted content can be recovered.

Exact XWiki line and version

Confirm whether the instance runs the stable line, the LTS line or the intermediate LTS line, and the exact patch version. Spam tooling, Admin Tools panels and extension compatibility differ between lines, so a version check decides which steps in this guide apply. Read the version from the administration pages rather than from memory or an old change request, and record it with the cleanup plan.

Installed extension versions

List the AntiSpam and Admin Tools extensions with their exact versions, and check each one against the XWiki version in use. An extension built for another line may load but miss spam signals or fail on bulk actions. Note any extension that was installed by hand or pinned, because updates can change how spam is flagged or hidden.

Spam detection availability

Confirm whether a spam detection extension is installed and enabled on this instance, and whether it is active on every wiki that accepts edits. Some instances rely only on manual review or on rules for guest edits. If detection is missing or partial, plan for a manual sweep of recent registrations and recent edits before you rely on any automated flag.

Reach of the spam overview

Find out how far the spam overview in Admin Tools reaches. Check whether it covers every wiki, only the main wiki, comments as well as pages, and attachments. Test it on a known spam page so you know what it will miss. Anything outside its reach needs a separate search by author, date or content before you call the cleanup complete.

Retention rules for deleted pages

Ask whether deleted pages go to a recycle bin, how long they stay there, and who can restore them. Also check whether page history, attachments and comments are kept after deletion, and whether backups hold older copies. Your retention policy decides whether a spam page is truly removed or only hidden, and that matters if you must show what was removed and when.

Backup before bulk deletion

Confirm that a recent full backup of the database and the XWiki data directory exists and that a restore has been tested. Bulk deletions are hard to reverse if the recycle bin is short or disabled. Schedule the cleanup so the backup is fresh and the rollback path is written down before anyone starts deleting.

Cleaning up XWiki spam: cost, time and what you need

How much effort does an XWiki spam cleanup take?

Effort depends mainly on how many spam pages and comments exist, how long the wiki has been open to registration, and whether spam has spread into content that people have edited since. A small wiki with a few dozen spam pages can usually be triaged in a short working session, while a public wiki that has been abused for months needs a review pass over page history, user accounts and comments. Ask any provider to break the quote into triage, removal, rights changes and verification, because those phases scale differently.

Can an in-house XWiki administrator clean up spam without outside help?

Usually yes, if the administrator has global admin rights, can read the server logs and is comfortable with the AntiSpam and Admin Tools spam overview. The work is mostly review and deletion, which an internal team can do with a documented procedure. Outside help becomes more useful when the cleanup must be evidenced for an auditor, when spam has reached attachments or templates, or when no one on staff has time to review the volume safely.

What access does a spam cleanup need from my team?

At minimum, someone with global administrator rights in the XWiki instance, read access to the application server logs, and a way to take a database and attachment backup before any deletion. Where the wiki runs in containers, the person doing the work also needs the matching access to the host or orchestrator so they can check versions and restart services. Confirm these details with your own platform team before work starts, because the rights model depends on how your instance was configured.

Does a spam cleanup need a maintenance window?

A window is advisable when the cleanup involves bulk deletion, changes to registration settings or a restart. Read-only review of spam pages can often run while users are active, but mass removal and rights changes should be scheduled so that legitimate editors know about them. Ask the provider to state which steps need downtime and which do not, and to confirm whether a restart is required after configuration changes in your deployment.

How long can a spam cleanup take to complete?

There is no fixed duration that applies to every wiki. The clock is driven by the volume of spam, the number of legitimate pages that must be checked before deletion, and how quickly your reviewers can confirm what should stay. Plan a separate period for tightening registration and guest rights, and for monitoring afterwards, since spam often returns through accounts or pages created during the cleanup. Ask for a timeline in the written scope rather than relying on an estimate in conversation.

When is it worth involving an XWiki support provider for spam cleanup?

Bring in a provider when the wiki is customer-facing, when spam includes content that must be documented for a compliance review, or when internal staff lack time or rights to act safely. A provider can also help when the wiki is a supported production system and you want the cleanup done under a written scope. For commercial XWiki support tiers, the XWiki SAS pricing page lists Starter, Basic, Business and Enterprise plans, with consulting at 1200 EUR per day available on Business or Enterprise support plans, so check whether consulting is included in your quote.

What should a quote for an XWiki spam cleanup include?

A useful quote lists the scope in writing: the instances and wikis covered, the spam review method, the deletion criteria, the backup and rollback steps, the registration and guest rights changes, and the verification checks. It should name who performs each step and what you must provide, such as backup access and admin accounts. Ask whether the price is fixed for the agreed scope or varies with volume, whether follow-up monitoring is included, and what happens if the review finds more spam than expected.

How DeployOpen scopes and delivers XWiki spam cleanup

DeployOpen approaches spam cleanup on a public XWiki as a bounded piece of work inside your own infrastructure. We agree the scope in writing, clean up the instance under documented rules, then tighten registration and guest rights so the problem is less likely to return.

How we scope

  • Confirm which wikis, spaces and comment areas are open to registration or guest editing.
  • Agree the spam criteria, the review owner and whether deletion or quarantine is allowed.
  • Record the tools, access levels and change window in a written, fixed scope before work starts.

How we build

  • Run AntiSpam and Admin Tools spam overview queries against a backup copy first.
  • Test the registration and guest rights changes on a staging instance before production.
  • Keep a log of every deleted page, comment and account so each action can be traced.

How we hand over

  • Deliver the list of removed content, changed rights and remaining open exposure.
  • Document the cleanup steps so your team can repeat the review on a schedule.
  • Walk your administrators through the registration, moderation and guest settings we changed.

How we support

  • Engagements are fixed-scope, with deliverables and timelines agreed in writing first.
  • Ongoing support and periodic spam reviews are available as a retainer.
  • Ask for a quote built from the written scope, since DeployOpen does not publish a price list.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.