Reset all hits to 0 (zero)

Written by webmaster.

if you're not familiar with Joomla! it's one of the most powerful open source content management system frameworks out today. Before Google Analytics was even around Joomla! has been doing simple page view tracking or "hits" as it's called in the admin area.

joomla_hits_counter1.gifOnce we launched the site all of the articles of our Joomla! powered site had huge amounts of "hits". As nice as it was for me to wake up this morning and think 1,587 people viewed my "About Me" page, it was not a true reality. I just needed to reset all the article page hits.

Resetting the hits on a per-page basis is extremely easy, as a matter-of-fact there is a "reset hits" button right next to the hit tracker on every article edit page. That's great, but I had a hundred or so articles I needed to reset. I thought for sure this would be a difficult task, but thanks to the Joomla! forums and the power of the community it was VERY simple.

It can easily be done through phpMyAdmin or on the command line by doing the following SQL query

update jos_content set hits = 0


Yes, that's it. I know I just did a lot of writing for such a simple solution, but I'm new to this blogging thing. Hope it helped.

NOTE: if you CHANCED your database jos_ to any thing els you will need to up date the code line

update brad_content set hits = 0