Available for projects & agency overflow · Quick reply, from the person who does the work

Uninstalling a module without leaving traces

Removing a module looks like the simplest operation in the world. In fact, disabling, uninstalling and deleting are three different things, and none of the three guarantees the module has left no trace in your store.

Describe my issue Send a message

Disable, uninstall, delete: three distinct operations

Disabling stops the module running but touches nothing: its files stay, its tables stay, its settings stay, and its scheduled jobs can keep firing if they were registered on the server. Useful for a test, not for removal.

Uninstalling triggers the removal routine the module provides. A well-written module drops its tables, its settings and its hook attachments there. A badly written one does nothing at all, or fails silently. On WordPress the distinction is sharper still: the uninstall routine only runs when the extension is permanently deleted, not when it is deactivated, which almost nobody knows.

Deleting removes the files. If uninstalling didn’t happen first, the data stays in the database with no code left to read or clean it: that is what turns up years later.

What survives a botched uninstall

  • Database tables still growing, with nothing left to read them
  • Configuration rows loaded on every request, weighing on all pages
  • Scheduled jobs registered on the server calling a file that no longer exists
  • Menu entries or admin tabs pointing at nothing
  • Files dropped outside the module folder: overrides, assets, images
  • An access key to a third-party service still stored somewhere

How I remove a module cleanly

  1. Back up first, files and database

    Uninstalling is destructive by nature: it drops tables. If those tables hold useful history, export it first, because afterwards there is nothing left to export.

  2. Uninstall before deleting

    In that order, never the reverse. Deleting the files first makes uninstalling impossible and condemns the data to stay.

  3. Look for what was placed elsewhere

    Class overrides, assets added to the theme, scheduled jobs, admin entries. Those are rarely handled by the uninstall routine.

  4. Clear caches and re-check the storefront

    A removed module often leaves a visual trace until the cache is cleared, and an error may only show on a rarely visited page. I place a test order after any removal.

The particular case of tables left behind

This is what I meet most often on a store taken over: a database holding the tables of modules removed long ago, sometimes large, sometimes full of logs never purged. They don’t slow pages directly, since nothing reads them, but they weigh on backups, restores and migrations, and they blur the reading of the database for any future work.

Cleaning isn’t complicated but it demands care: you must know for certain which module each table belonged to before touching it. A table prefix resembling that of a removed module can belong to a module still active. I do that sorting on a copy of the database, and I keep a full export before any deletion.

Related pages

Describe your need in one minute

A few targeted questions so I can reply with an estimate rather than another questionnaire.

version
besoin
etat
theme (facultatif)
Please provide an email or a phone number so I can get back to you.

Please provide an email or a phone number so I can get back to you.

Frequently asked questions

Is disabling enough if I no longer want the module?
For a test, yes. For lasting removal, no: the files remain loadable and the data remains in the database. That said, disabling is sometimes the right call for a payment module, whose data still serves past orders.
How do I know which tables belonged to a deleted module?
By their prefix, which usually echoes the module’s technical name, and by their last write date. I cross-check both before concluding, because a prefix alone isn’t proof.
Can a deleted module still slow the site down?
On WordPress, yes: settings left in the database can be loaded on every request, however many there are. It is one of the cases where cleaning has a measurable effect on the admin.
Should unused modules be uninstalled?
Yes, and not only for performance: an unused but present module is still executable and keeps carrying any flaws it has. Removing what is no longer used is the cheapest way to reduce the exposed surface.