Tutorial – In recent versions of they removed the functionality to reset the Article Hits Counter. This was a very useful feature because during the testing phase of your site, you probably opened the article a million times. But now that your site is going into production, you want an accurate count of how many times your article was viewed.
Sorry to say, there is no easy way to reset the Article Hits Counter. You will have to access your database withand reset your Article counter using SQL or edit the values in the table. Below I will show you how to do this.
Overview of how to reset the article counter:
- Find Article ID in the
- Access your Database from
- Locate the “Article” table
- Change the Article Hit Count – Basic or
- Change the Article Hit Count – Advanced
More detailed steps:
1. Find Article ID in the
Every article that you save in your2.5 website has a unique ID number. So you must find this number in your Article Manager. If you want to reset all your article hit counters, I will also show you how to do that below. This step is if you want to reset the hit counter for 1 article.
- Login to your Joomla 2.5 Administrator backend
- Click on ‘Content’, ‘Article Manager‘
- Under ‘Article Manager: Articles’, find your Article and look at the far right column under ‘ID’.
- You will find the Article ID number. For example:
- I want to reset ‘Administrator ‘ article, Article ID=1
- Save this information for Step 4
2. Access your Database from
- Login to your phpMyAdmin
- Click on your Database to open up all the tables on the left navigation
3. Locate the “Article” table
- Scroll down to find the table name _content
- Each table name is prefixed with some letters/numbers. This is different for everyone, but what remains the same is the table name.
- Click on the table name _content
4. Change the Article Hit Count – Basic
There are 2 ways to reset the Article Hit Counter and step 4 is the Easiest (Basic) way.
- In the table, find the Article you want to reset.
- For example: I searched for article title ‘Administrator Components‘
- Confirm the Article ID number is the same as in Step 1
- Click on the ‘pencil’ icon (2nd column) to edit the record in the _content table
- Scroll down to ‘Hits’, and set the following value:
- Hits = 0
- Click on ‘GO’
5. Change the Article Hit Count – Advanced
This is the more advanced way where you will use SQL to mass reset all articles hit counter. This step is reserved for those who are experienced with SQL. If you are not an expert, be careful when using this query changes you make might affect the all database data.
Note for the queries below, you must replace the code in italics with database information of your own.
This query will reset all Article hit counters to 0
- UPDATE `YourDatabasename`.`PREFIX_content` SET `hits` = ‘0’
This query will reset Article hit counter for one article. For example ID = 1
- UPDATE `YourDatabasename`.`PREFIX_content` SET `hits` = ‘0’ WHERE `PREFIX_content`.`id` =1;
After you run the SQL you can refresh your Joomla 2.5 website and you will see your Article hit counter set back to zero.
Hope that helps. Let me know if you have any further questions.