Print this page

Reset article hits in Joomla 3

Reset article hits in Joomla 3Since Joomla 3.2.3 the functionality to reset the hits on an individual Joomla article has been absent. Our clients often like to have the hits value set to zero before launch so that the views from testing & development don't count towards the value. There are some extensions available to re-introduce the reset hits in Joomla 3 functionality in the extensions directory, however because this is often a once-off need for us we usually do this directly via a database query, here's how:

Note: Remember to run a backup before working with advanced tasks!

Access the mySQL database instance you're using for your Joomla 3 website. Typically this is done using phpMyAdmin or a stand-alone mySQL tool. We really like SQLyog for our day to day database tasks. Once you've navigated to the database instance, take note of the prefix each table is using. You'll use that in the query to reset the article hits value. The mySQL command to run, where pre_ if your specific table prefix, is then

UPDATE pre_content
SET hits=0;

That query will reset all the values for 'hits' in the content table to zero. Enjoy!



  • Rate this item
    (0 votes)
  • Published in Blog
Privacy Policy   |   © Sharkey Consulting: Online Shopping Experts. All rights reserved.

Sharkey Ecommerce Consulting Ltd. and this site is not affiliated with or endorsed by The Joomla! Project™. Any products and services provided through this site are not supported or warrantied by The Joomla! Project or Open Source Matters, Inc. Use of the Joomla!® name, symbol, logo and related trademarks is permitted under a limited license granted by Open Source Matters, Inc.