Add possibility for Detach button in WordPress Toolkit, that it can check and remove records for non-existed WP instance from the WordPress
At the moment the situation is following:
I scenario
The WordPress instance is installed in the /var/www/vhosts/example.com/httpdocs/old/ directory.
If the mentioned directory was manually removed from the server-side and the Detach button was pressed after in Domains > example.com > WordPress, the leftovers of the non-existed WordPress instance still can be found in WordPress SQLite database /usr/local/psa/var/modules/wp-toolkit/wp-toolkit.sqlite3
II scenario
The WordPress instance is installed in the /var/www/vhosts/example.com/httpdocs/old/ directory and files from this directory were manually moved to /var/www/vhosts/example.com/httpdocs/.
The Detach button was pressed after in Domains > example.com > WordPress, however the leftovers from the WordPress instance that currently is non-existed in /var/www/vhosts/example.com/httpdocs/old/ directory still can be found in WordPress SQLite database /usr/local/psa/var/modules/wp-toolkit/wp-toolkit.sqlite3
In both scenarios, it can cause error notifications that are sent to Administrator or Customers.
Thus based on the points above after pressing the Detach button for the removed WordPress instance, it should check and remove leftovers from the WordPress SQLite database in case such an instance does not exist anymore
Starting with v5.9.2, when a site is detached, information about it should be removed from WPT SQL DB.
--AK
-
Plesk Tech Support commented
Hello,
In addition, please implement an update to the WordPress Toolkit scan functionality so that it would automatically detect and remove any leftover records from the SQLite database for the missing instances.