How to change the number of hits on an article in Joomla?

Why change the number of hits?
The article hits counter is not just a number in Joomla CMS. It is an important tool for analyzing the popularity of content, which helps site owners make decisions about project development. However, what if you need to change the number of article hits in Joomla? For example, you want to reset the counter for a new month or manually set a certain value for testing the «Popular Articles» module.
By default, there is no way to edit the «Hits» field in the Joomla admin panel. But don't worry — in this article, I'll show you three ways to change or reset the hit counter:
- Through the database — ideal for those who prefer to work directly with «phpMyAdmin».
- Use the «Reset Hits» plugin to automate the process of resetting hits via Cron.
- Installing the «Article Hits» — plugin is an easy way to manually set the desired number of views.
Each of these methods has its own advantages, and you can choose the one that best suits your needs. Let's take a closer look at them!
Method 1: Change the number of hits through the database
If you need to quickly reset the pageviews counters of all articles or change the number of hits for a specific article, phpMyAdmin will be your reliable tool. Let's look at two scenarios that will help you solve different tasks.
Resetting hit counters for all articles
This method is suitable if you want to reset the pageviews counters for all articles on your site. For example, during the development of the site, you may have repeatedly opened articles, which led to incorrect hit counts. After launching the site, it is important to start from scratch.
Step-by-step guide:
- Find out the prefix of the database tables (look screenshot 1):
- Go to the Joomla admin panel.
- Go to the «Global configuration» section.
- Open the «Server» tab and find such parameters as «Database Name» (in my case it is joomla5) and «Database Table Prefix» (in mine a7jo6_). Memorize them or write them down, because you will need them.
- Go to «phpMyAdmin» and select your database on the left. In my case it is joomla5.
Note If you do not know how to access «phpMyAdmin», please contact your hosting provider or server administrator.
- Run the SQL query (look screenshot 2):
Be careful when working with the database. An error in a query can lead to unforeseen consequences. It is recommended to make a backup copy of the database before executing queries!
- On the right, go to the SQL tab.
- Enter the following query, replacing a7jo6_ with your table prefix:
UPDATE a7jo6_content SET hits = 0
- Click the «Go» button. After the request is completed, all articles will have "0" hits.
Change the number of hits for a specific article
If you need to change the number of hits for just one article, for example, to test the «Popular Articles» module, use this method.
Step-by-step guide:
- Find the article you need in the database (look screenshot 3):
- In «phpMyAdmin», select the #_content table (for example, a7jo6_content).
- Find the line that corresponds to the desired article. You can focus on the title of the article in the «title» column.
- Change the value of the «hits» field (look screenshot 4):
- Click the «Edit button» (pencil icon) next to the row you want to edit.
- Find the «hits» field and change its value to the desired value (for example, 16).
- Click the «Go» button to save your changes.
Now the selected article will have a new number of hits.
Method 2: Using the Reset Hits plugin
If you are looking for a more convenient way to manage your Joomla pageviews counter, the «Reset Hits» plugin will be a great solution. This free tool, developed by «Woluweb» (Marc Dechèvre), allows you to automate the process of resetting the hits of articles, categories and tags. Let's see how to install and configure it.
How does the Reset Hits plugin work?
The «Reset Hits» plugin adds a new task to the «Scheduled Tasks» section of Joomla. After installing it, you can easily reset hit counters manually or automatically via Cron. This is especially useful for sites where it is important to track the popularity of content over a certain period, for example, to display the «Most Popular Movie of the Month».
Installing the Reset Hits plugin
- Downloading the plugin
- The plugin is completely free and available for download on GitHub.
- Installation through the Joomla admin panel
- Go to the section System > Install > Extensions.
- Upload the plugin file via the button «Or browse for file».
- After successful installation, activate the plugin in the section System > Manage > Plugins.
Setting up the Reset Hits task
After installing the plugin in the section System > Scheduled tasks you will be able to add a new task — «Reset Hits» (look screenshot 5).

Now you have two options for use.
Option 1: Manually run the task
If you need to reset your hit counters one time:
- Create a new task in «Scheduled Tasks» by selecting «Reset Hits».
- In the «Execution Rule» field, select «Manual Execution» (look screenshot 6).
- Enable «Reset contents hits» to reset article hits («Reset tags hits» to reset tag hits and «Reset categories hits» for categories can be enabled optionally) (look screenshot 6).
- Save the task.
- Find the created task in the list and click the «Run Test» button (look screenshot 7).
This way, you can quickly reset the hits of articles, categories, and tags to zero.
Option 2: Automation via Cron
For advanced users who know what Cron is, this option will work best. For example, if you want to reset the hit counters to zero on the 1st of every month to show the «Most Popular Movie of the Month», follow these steps:
- Create a new task «Reset Hits» in «Scheduled tasks».
- In the «Execution Rule» field, configure the task launch schedule (look screenshot 8). For example:
- Interval: Months
- Execution Day: 1
- Execution Time (UTC): Specify the time when the task should be executed.
- Save the task.

Now Cron, which is configured on your server to run Joomla Scheduled Tasks, will automatically run the task at the specified time, freeing you from having to do it manually.
The «Reset Hits» plugin is a powerful and easy tool for managing Joomla hit counters. It is suitable for both manual and automatic data reset. If you want to avoid routine work with the database and gain more control over your hit counters, this plugin will be your reliable assistant.
If you have any questions about setting up the plugin or want to share your experience with it, leave a comment below!
Method 3: Set hits manually through Article Hits
If you are looking for the easiest way to change the number of hits in Joomla articles, then the «Article Hits» plugin will be the perfect solution. This tool is developed by Michael Richey and allows you to manually set any value of the hit counter directly from the Joomla admin panel. Even beginners can easily master this plugin.
How the Article Hits plugin works?
The «Article Hits» plugin adds the ability to edit the «Hits» field directly in the article editing interface. After installing the plugin, you will be able to manually specify the required number of hits for each article without resorting to complex settings or working with the database.
Installing the Article Hits plugin
- Downloading the plugin
- The plugin is free and available for download on the developer's official website.
- Installation through the Joomla admin panel
- Go to the section System > Install > Extensions.
- Upload the plugin file via the button «Or browse for file».
- After successful installation, activate the plugin in the section System > Manage > Plugins.
How to use the Article Hits plugin?
After installing and activating the plugin:
- Open any article in edit mode.
- Go to the tab «Publishing».
- Note that the «Hits» field is now editable.
- Enter the value you want for the hit counter and save your changes.
Thus, you can either zero the number of hits or set any other value.
I also recommend that you restrict access rights: allow the plugin to be used only by «Super Users». This will help to avoid accidental changes to the hit counter by other users. In addition, if you use the plugin only to change values once, it is better to disable it after you have finished working, just in case.
Conclusion
We have reviewed three different ways to change the number of hits, each of which has its own features and advantages. If you prefer to work directly with the database, then the first method through «phpMyAdmin» will be the best solution for you. For those who value automation, the «Reset Hits» plugin offers a convenient tool for setting up regular resetting of hits via Cron. And if you need maximum simplicity, the «Article Hits» plugin will allow you to manually set any counter value directly from the Joomla interface.
If you have any questions or want to share your experience with these methods, please leave a comment below. I always welcome feedback and am ready to help!
Frequently asked questions
- Why can't I change the default number of hits in Joomla?
In Joomla, the «Hits» field is read-only in the admin panel interface. This is done to prevent accidental changes to the data. However, if you need to change this value, you can use one of the three methods described in the article.
- Can I reset the hit counter only for certain articles?
Yes, it is possible. If you are using the «Article Hits» plugin, you can manually change the number of hits for a particular article.
- What is Cron and how does it relate to the Reset Hits plugin?
Cron is a tool for automating tasks on the server. The «Reset Hits» plugin allows you to set up automatic resetting of hit counters via Cron. For example, you can set up a task that will reset the hits on the 1st of every month. This is especially useful for websites where it is important to track the popularity of content over a certain period.
- Is it safe to edit the database through phpMyAdmin?
Working with the database through «phpMyAdmin» is safe if you follow a few rules:
- Always back up your database before making changes.
- Make sure you are editing the correct table and row.
- Avoid massive changes if you are not sure of their consequences.
If you are a beginner, it is better to use safer methods, such as the «Reset Hits» or «Article Hits» plugins.
Comments: 0
Only logged in users can comment