Reset Hits in Joomla

Joomla! tracks article hits automatically, and in Joomla 5 and 6 that behaviour remains unchanged — every article view increments a counter stored directly in the database. When you're preparing a site for launch, handing it over to a client, or simply tidying up after a period of testing, resetting those counters to zero is a common housekeeping task. It's worth being clear upfront: article hits are not the same as page-level analytics. If you need granular traffic data, you'll want a dedicated analytics integration — Joomla 6 supports several through its extension ecosystem — but for the built-in hit counter, a single SQL statement is all it takes.

TL:DR – An easy way to reset all the Hits for all your articles.

Pre-requisites

  • You'll need direct access to your database, typically through a tool such as phpMyAdmin provided by your web hosting control panel.
  • Work carefully — you're running SQL commands against a live database. Take a full backup before you start.
  • These steps apply to Joomla 5 and Joomla 6. The underlying database structure for content hits has not changed across these versions, so the same query works for both.

Find the database settings in Global Configuration

Log in to the Joomla administration panel and navigate to System → Global Configuration, then select the Server tab.

Scroll down to the Database section and make a note of two values: the Database Name and the Database Tables Prefix. The prefix is typically something like abc1_ and varies per installation — you'll need it for the SQL query below.

Run the reset query in phpMyAdmin

Open phpMyAdmin from your hosting provider's control panel. Select the database that matches the name you noted from Global Configuration — take care here, as your hosting account may list several databases and selecting the wrong one could affect other applications entirely.

Click the SQL tab and enter the following command, replacing xxx with your actual database prefix:

UPDATE xxx_content SET hits = 0;

Click Go. phpMyAdmin will display a confirmation message showing how many rows were affected. If your site has fifty articles, you should see fifty rows updated.

Verify the reset in Joomla

Head back to the Joomla administration panel and open Content → Articles. If the Hits column isn't visible, use the Columns toggle in the toolbar to enable it. All values should now read zero.

Resetting hits for a single article or a subset

If you only want to zero out hits for a specific article rather than the entire site, you can target it by ID. Find the article ID in the Articles list — it's shown in the ID column, again toggled via the Columns button — and adjust your query accordingly:

UPDATE xxx_content SET hits = 0 WHERE id = 42;

You can also target a category by joining against the category ID, or reset only articles published before a certain date. The xxx_content table in Joomla 5 and 6 retains the same structure it has had for several major versions, so any SQL examples you find for Joomla 4 will work without modification.

A note on caching and third-party analytics

Joomla 6 ships with improved system caching options, and if you have page caching enabled it's possible that hit counts appear not to update immediately after a reset — or indeed during normal operation. This is expected behaviour. Clearing the system cache from System → Clear Cache after running your reset query will ensure the administration views reflect the true database values. If your site uses a third-party analytics extension or a server-side stats package, those systems maintain their own data stores entirely separately from the xxx_content hits column, so resetting article hits here will have no effect on those reports.


ezone is not affiliated with or endorsed by The Joomla! Project™ or Open Source Matters. The Joomla!® name and logo is used under a limited license granted by Open Source Matters, the trademark holder in the United States and other countries.