3.0 Tutorial on how to Reset the article hits. After I did a series of testing and opening articles, the hit count skyrocketed. But how do I reset the hits counter back to zero when I want to make my website live? That’s the question I had when I wanted to promote my website. Since there was no easy way to reset the hit count back to zero and I really didn’t want to install a component to reset the count, I looked into the alternative. This was to reset the article hit count in the database itself.
You need to access yourin your web hosting. You will need your database username and password. If you are not sure of what these are, you can look at your MYSQL Database usernames and password in your web hosting provider. Be careful you do not make any mistakes or delete any tables. If you delete tables or change data incorrectly it might bring down your entire 3.0 Website. If you want you can take a backup of your database before proceeding.
Steps to Reset Article Hit Count in
- Go to phpMyAdmin in Webhosting
- Access Database in phpMyAdmin
- Browse & Edit the Database Table – _content
- Reset Article Hits to 0
- See Article Hits list is 0, Want to Reset them All?
- Use SQL to Reset All Article Hits
- Successfullly reset all Article Hits
- See All Article Hits is 0
1. Go to phpMyAdmin in Webhosting
phpMyAdmin is the software you will use to access your database and manipulate your database tables. To access your database in phpMyadmin you will need your database username and database password.
- Login to your Webhosting account
- Click on ‘MySQL Databases’
- Click on ‘phpMyAdmin‘
- Enter you Database username and password
2. Access Database in phpMyAdmin
You might have many databases linked to your website in phpMyAdmin. Remember which database you created for thisinstance. Typically there should only be 1.
- Click on your database
3. Browse & Edit the Database Table – _content
You will find the listing of database tables along the left side. They are all prefixed with the prefix you assigned at installation. After the underscore you will see the table name. All articles are in the _content table.
- Click on the table _content
- Click on Browse
- Click on the pencil icon next to the article hits count you want to reset
4. Reset Article Hits to 0
Now you are editing the article in the database. Do not fool around with or make any other changes in the article settings. If you delete or make any mistake it might bring down your entire Joomla 3.0 website.
- Scroll down to ‘hits’, set the following value:
- Hits = 0
- Click on ‘Go‘
5. See Article Hits list is 0, Want to Reset them All?
Now you are in the Browse screen again and you can scroll over the right where you can see the ‘hits’ column. You will see that we reset the ‘hits’ to 0. But if you look below there are all these other article hits to reset. You can reset them all with one SQL command. I will show you how in step 6.
- Scroll to the right, see the ‘hits‘ column
- See all the hits below it, want to reset them all easily? See step below
6. Use SQL to Reset All Article Hits
Please use caution when resetting all the article hits. This is a mass change to all articles in your Joomla 3.0 website. Please do not make any mistakes otherwise it will cause a lot of damage to your database and might bring down your entire website.
- Click on ‘SQL‘
- In the ‘Run SQL query/queries on database:’, enter the command in the box below, make sure to enter in your own database name and prefix name. I’m just using cmsdb as my database and cms as the prefix
- UPDATE `cmsdb`.`cms_content` SET `hits` = ‘0’;
- Click on ‘GO‘
7. Successfullly reset all Article Hits
After you run the query you will see the number of rows you changed.
- See the number of articles/rows you changed.
- You will see a message that says, for example:
8. See All Article Hits is 0
Now you can scroll to the right and see all the articles hits again. You will see that all the article hits are 0.
- Scroll to the right to the column ‘Hits‘
- See all the hits are reset to 0
Thanks! Leave a comment and let me know if this helped you.