Reset Joomla 3.x article hits & revisions in SQL
When you're in the midst of a Joomla web development project, it is of course a necessity that you view the pages of the website as you are working on the site. The unfortunate side effect is that the site will in-turn show a bloated view count by the time you are ready to launch the project.
If you're like me, you find this unnerving. Fortunately, there is an easy way to reset the article count in MySQL just before you deploy the. Simply run the following SQL command (make sure to replace XXXX_ with your table prefix) and your site will return to a clean and orderly state:
# Update a all articles
UPDATE `XXXXX_content` SET `hits` = 0 ;
UPDATE `XXXXX_content` SET `version` = 1 ;
# Update a single article
UPDATE `XXXXX_content` SET `hits` = 0 WHERE `id` = * ;
UPDATE `XXXXX_content` SET `version` = 1 WHERE `id` = * ;