PHP script for wiping WP database and folder

You haven’t been able to find anything like that because it is impossible to do as in 95% of the servers the web server do not have the permission to delete the files that were uploaded via FTP.

In addition it takes only two commands in the command line interface to do this and it will actually be slower to do it your way.

Edit: For a moment I forgot you can use the filesystem API to delete files, still it amounts to connecting via an FTP program and you will probably be restricted to delete the files sequentially which can really take long time.

tech