How to Reset Article Hits in Joomla 3.0 using phpMyAdmin

by Elaine on December 1, 2012

Joomla 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.

joomla 3 reset article hits phpmyadmin 9 How to Reset Article Hits in Joomla 3.0 using phpMyAdmin

You need to access your phpMyAdmin in your web hosting.  You will need your phpMyAdmin 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 Joomla 3.0 Website.  If you want you can take a backup of your database before proceeding.

Steps to Reset Article Hit Count in phpMyAdmin

  1. Go to phpMyAdmin in Webhosting
  2. Access Database in phpMyAdmin
  3. Browse & Edit the Database Table – _content
  4. Reset Article Hits to 0
  5. See Article Hits list is 0, Want to Reset them All?
  6. Use SQL to Reset All Article Hits
  7. Successfullly reset all Article Hits
  8. See All Article Hits is 0

Steps:

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.

joomla 3 reset article hits phpmyadmin 1 How to Reset Article Hits in Joomla 3.0 using phpMyAdmin Joomla 3.0 Reset Article Hits in phpMyAdmin
  • 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 this Joomla 3.0 instance.  Typically there should only be 1.

joomla 3 reset article hits phpmyadmin 2 How to Reset Article Hits in Joomla 3.0 using phpMyAdmin Joomla 3.0 Reset article hits – select database
  • 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.

joomla 3 reset article hits phpmyadmin 3 How to Reset Article Hits in Joomla 3.0 using phpMyAdmin Joomla 3.0 – Reset article hits in _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.

joomla 3 reset article hits phpmyadmin 4 How to Reset Article Hits in Joomla 3.0 using phpMyAdmin Joomla 3.0 – Reset article hits to 0 in 1 article
  • 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.

joomla 3 reset article hits phpmyadmin 5 How to Reset Article Hits in Joomla 3.0 using phpMyAdmin Joomla 3.0 – Reset article hits – there are more to reset
  • 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.

joomla 3 reset all article hits phpmyadmin 6 How to Reset Article Hits in Joomla 3.0 using phpMyAdmin Joomla 3.0 – Reset all article hits to 0
  • 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.

joomla 3 reset all article hits phpmyadmin 7 How to Reset Article Hits in Joomla 3.0 using phpMyAdmin Joomla 3.0 – Reset All Article Hits to 0 -number of rows changed
  • See the number of articles/rows you changed.
  • You will see a message that says, for example:
8 row(s) affected.  (Query took 0.0478 sec)

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.

joomla 3 reset all article hits phpmyadmin 8 How to Reset Article Hits in Joomla 3.0 using phpMyAdmin Joomla 3.0 – Change All Article hits to 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.

Elaine

 How to Reset Article Hits in Joomla 3.0 using phpMyAdmin

Elaine

Elaine is the founder of CmsMind, an online blog providing Joomla and Wordpress tutorials. Elaine lives in Toronto and when she is not online, she is either Marathon and Triathlon training or travelling and racing somewhere in the world. Find her also at: Save Money, Premium Themes and Templates, and at Webhosting Tips.

More Posts - Website

Leave a Comment

Captcha Captcha Reload

Older Post:

Newer Post: