1

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/

1 Answer 1

1

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 )

3
  • Thank you. I was sort of expecting this kind of message. Time to load the backups :) Commented Feb 17, 2020 at 20:09
  • At the end, I found out the root cause: zdnet.com/article/… Commented Feb 17, 2020 at 21:45
  • @PavelJanicek your question asks if WP keeps a history of the queries it runs, is that not the case? If question was actually "What wiped my WP site" you should ammend your question, as that isn't what you've asked. Other people will find it wanting to know if WP keeps a query log, and get confused
    – Tom J Nowell
    Commented Feb 18, 2020 at 9:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.