Is there a way to see history of WordPress database changes?

One of my WordPress pages went suddenly "blank". Basically to the point that it shows as if there is clean install of wordpress. Files in wp-content/uploads are there, but all the posts from database are gone.

While I do have backups, I would like to know, what actually happened.

I have found StackOverflow question, but that history does not log queries run by the aplication.

Any help is appreciated

Edit: Root cause was infected Theme importer: https://www.zdnet.com/article/bug-in-wordpress-plugin-can-let-hackers-wipe-up-to-200000-sites/

Topic logging database Wordpress

Category Web


There is no WordPress specific query log unless you build one yourself. The only history you'll get will be the history that MySQL itself provides.

Unfortunately, the database does not distinguish between applications, so you will have to filter by tables and database to just those relevant to you. How you might do that is beyond the scope of WordPress though, and in the realms of SQL server admin and expertise ( and will depend on the vendor of the database you're using, e.g. MariaDB, vs stock MySQL, etc and the version of the software used )

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.