WordPress Cleaner – optimize your database

Back in the old days I've written a very simple script to remove posts' revisions from WordPress database. It was published on my GitHub, but it was broken due to syntax error in SQL query... and it was a good thing because it might actually remove important content from your database.

And yet, the time has come. I sat down and rewrote whole script from scratch. Turned it into modular WordPress cleaner, improving performance of your installation by removing tons of garbage from your database. It is now able to remove following kinds of junk:

  • post revisions (disabled by default)
  • auto drafts
  • spam comments
  • unapproved comments
  • orphan commentmeta
  • orphan postmeta
  • transient options
  • akismet commentmeta

Look how the script performs on production database of my website (using default settings).

WordPress Cleaner

You can grab it from GitHub repository. Feedback and contributions are welcome!

4 komentarze do “WordPress Cleaner – optimize your database

  1. Tymon pisze:

    Huh, I do not know why your blog contains mixed EN and PL content? Why didn’t you think about two separate pages? It makes site easier to read…

    • Sobak pisze:

      In general you are right, of course. I just didn’t take it into consideration previously, when I wrote my first post in English. Despite the last three posts, I’ll probably still use Polish as my primary blogging language – it allows me to express in way more detailed way.

      I will try to find the way to clearly separate languages and improve browsing experience (uh, that marketing language, again).

      Thanks for the feedback!

Dodaj komentarz

Twój adres email nie zostanie opublikowany. Pola, których wypełnienie jest wymagane, są oznaczone symbolem *