Removing of Piwik application removes root domain directory even if it is not empty.
Internal issue with id #APSI-186 ; the fix is considered to be included in one of the next application updates.
For existing applications:
Login to Plesk database using article 213928465 .
Find package id using the following query:
select cacheId from smb_apspackages where vendor like '%piwik%';
/usr/local/psa/var/apspackages/<package_id>/cache/scripts/configure(on Linux) in text editor.
Remove or comment the following line:
By default this line will have number 121.
After that removing of Piwik installation will not lead to removing of application root directory.
Note: For several Piwik installations it is needed to edit configuration file for each of installation.
For new applications:
Download patched application .
Install application from Plesk > Tools & Settings > Application Vault > My Apps > Add App
Select uploaded application and click Make Available button.
Patched application will be available in application catalog with name
Note: Switch on automatic updates of application to make sure that all updates will be installed as soon as the issue will be fixed.