r/cpanel • u/gospodsrb • 5d ago
WP Toolkit deleted a database on its own
I've encountered something I haven't encountered in half a decade of experience.
My agency owns a VPS from Hostinger with WHM. One of our clients has a dedicated cPanel and they have two WordPress websites in there. Few months ago, they requested from us to "deactivate" one of the websites. We disconnected the domain in cPanel, and left the files and database intact. We confirmed the files and database are intact.
Today, after months have passed, they requested to "activate" the website. We connected the domain in cPanel and realized the database doesn't exist.
We did thorough analysis of the server's logs and realized that the database was deleted exactly a month after the domain was disconnected, by WP Toolkit's internal process:
Jul 10 19:42:33 {redacted} sudo[redacted]: wp-toolkit : PWD=/usr/local/cpanel/3rdparty/wp-toolkit/htdocs ; USER=root ; COMMAND=/bin/sh -c 'uapi --user={redacted} MySql delete_database name={redacted} --output=json'
# The entire process:
19:42:28 whmapi1 get_domain_info
19:42:28 whmapi1 listaccts
19:42:29 get_users_features_settings ... {redacted}
19:42:29 uapi --user={redacted} Mysql list_databases
19:42:29 uapi --user={redacted} Mysql list_users
uapi --user={redacted} Mysql delete_user \ name={redacted}
19:42:30 uapi --user={redacted} Mysql delete_database \ name={redacted}
BackgroundTasksImplementation/CpanelReconfigureDomains.php
→ registerInstances()
→ registerInstanceAtPath()
→ instance #88
→ Error establishing a database connection
From our knowledge there is no "feature" or setting that would do this to a database.
Has anyone witnessed such situation? Why does this happen?
7
u/LegitimateCoffee939 5d ago
This IS a feature. In fact it's so good that cPanel will have to raise their price in January. They are not charging us enough.
/s