How to Reset Article Hits in Joomla 4

The easiest way to keep track of the number of visitors paying visits to your articles is through hit counters. Joomla CMS comes with the ability to track your article web page views each time your page is viewed. But, in most cases, while developing a site you might need to visit your articles several times before it has been released online. As a result, your articles might end up with the counts from views from your end. Hence it’s necessary to reset your article hits right before it hits online to get the accurate number of your viewers. 

In this article, we will take a look at how can you get your Joomla article hits to get to zero without having to do much. 

All You Need to Know About Article Hits

For those who looking are for an in-depth idea about article hit counters, here’s a quick and productive discussion for you. 

  • What are Article Hits: Article hits are basically the recorded number of times your web article pages have been accessed. 
  • When Should You Reset Hits: Chances are while creating a website you need to view your articles from the front end. Joomla tends to remember your article clicks and that’s when it is necessary to reset the hit counts right before publishing your article online.
  • Advantages of Articles Hits Counter: One way of monitoring your website traffic is through your article hits, Weigh your articles’ popularity through the hit counters and effectively track your stats. Plus, it’s super easy to get done with the whole process!

The only disadvantage is that this process only calculates how many times your articles have been viewed. This is not necessarily the number of unique visitors you have had on your website. Also, it doesn’t give you any idea about how long a particular article was viewed. 

Apart from that, the article hit counter is pretty handy!

So without further delay, let’s get started.

Step 1: Log in to Your Joomla Dashboard

First and foremost, log in to your Joomla dashboard. Navigate to Content > Articles. Here you should be able to find the list of all the articles that you wish to publish. In this tutorial, we will demonstrate using Helix Ultimate. We already have our Helix Ultimate Template framework installed which contains all our articles. 

Note that all the articles already have multiple hits according to the views made earlier. We have to set these hits to zero.

Step 2: Navigate to the Global Configuration Settings

Once you have logged in to your dashboard, navigate to Systems > Global Configuration.

From the Global Configuration head to the Server tab. In the Server tab, scroll down to the Database section to find Database Name and Database Tables Prefix

Note down your database name and database tables prefix as you will need them for your next step. 

Step 3: Log in to phpMyAdmin & Look For Your Specific Database

Now it’s time to log in to your phpMyAdmin panel. Go to http://localhost/phpMyAdmin from your browser. You should be able to see the list of databases that you have been using. Look for the database name you found in Step 2.

Step 5: Input the Reset Code

Upon choosing your database navigate to the SQL tab beside the Structure tab at the top. 

Now all you have to do is add the following simple code:

“update tableprefix_content set hits = 0”

Here tableprefix stands for the Database Tables Prefix you found in Step 2. 

In our case, the Database Tables Prefix is r0jva_.

Finally, click on the Go button to apply and save your changes. If your code was run successfully you should be able to see a success message.

Step 6: Go Back to the Articles From Joomla Dashboard

Time to check on the results! Now from your Joomla dashboard go to Contents > Articles. 

As you can see we have successfully reset the hits to zero! Give yourself a pat on your back if you could follow so far!

Wrapping Up

Hope this quick tutorial comes in helps. Feel free to let us know if you have relevant questions or if you have got stuck anywhere. Joomla has endless possibilities to offer you so go ahead and keep exploring! Good Luck!