Uninstalling a web app does not always remove it
Last week we tidied up our own hosting account. The one-click installer in cPanel (Softaculous) flagged one outdated app: a test Moodle site on a subdomain we had stopped using.
We couldn't upgrade it. The new Moodle version needed a newer database server than our shared host runs. An app you can't patch and don't use is an easy decision, so we clicked remove.
Then we checked from outside
The installer said the job was done. We asked for a few Moodle files by URL anyway, the way an attacker's scanner would.
The installer and database were gone, but most of the code was still there. Files like config.php and the core library answered requests and ran. The data was gone, but the code was still running in public, and nothing was patching it any more.
We deleted the folder by hand and checked again. Every Moodle file now returned "not found". But the subdomain now showed a public directory listing of the leftovers, including an old PHP error log. The server blocked downloads of the log, but there was no reason to advertise it.
What a full removal looks like
An app on shared hosting is spread across more places than its folder. This is the checklist we now follow:
- Remove it in the installer, ticking the options to delete files and the database.
- Delete the folder in File Manager, plus any data folder outside it (Moodle keeps one called
moodledata). - Delete the database and its user under MySQL Databases.
- Remove its cron job, if it had one.
- Remove the subdomain under Domains.
- Delete the DNS record wherever your DNS is really managed. For us that's our provider's portal, not cPanel.
- Check from outside. Request a few of the app's known files by URL. You want "not found" or nothing at all.
Do step 7 every time. A control panel shows what it thinks it did. The only way to know what's left is to ask the server the same way a stranger would.
The wider lesson
Small sites usually get broken into through something forgotten: an old test install, an unpatched plugin, or a subdomain from years ago. Removing unused software is one of the cheapest security wins there is, as long as you check it's actually gone.
If you're not sure what's still running on your hosting account, get in touch. We're happy to take a look.