Getting the Confluence page count

How to determine the number of pages in the source Confluence?

The number of pages directly correlates with migration effort and times. This is why it’s a must to determine the number of pages in Confluence in one of the early phases of your Confluence to SharePoint migration project.

There are different approaches to getting the Confluence page count, described in the following sections.

Getting the page count from the database via SQL


  • returns a guaranteed accurate page count


  • needs permission to run SQL queries on the Confluence database
  • only works with Confluence Server and Confluence Data Center (not Confluence Cloud)

Connect to the Confluence database and run the following SQL query:

select count(*) from content where (contenttype='PAGE' or contenttype='BLOGPOST') and prevver is null and content_status='current';

Note: Depending on the type of database the SQL query syntax might vary.

Atlassian also has some useful snippets here: How to find the number of pages, blogposts, and attachments.

Getting the page count in Confluence Cloud

Via Space Report

Go to Confluence Cloud administration. In the left menu, click the Space Reports option. Create a report and download it.

Create a space report at '/wiki/admin/space-reports'.

Those reports include a list of all spaces and the content count per space.

Sum up all those content counts for all spaces and you’ve got the overall “page count”.

Here’s an example of calculating the overall count (57170) in Excel:

This number is what determines the Page Count Tier for the WikiTraccs license.

Via Analytics

In Confluence Cloud, you can use the Analytics features to get insights into the number of pages. See the discussion here: Page Count?

Getting the page count from the REST API

Getting the page count from the REST API depends on too many factors like permissions, page restrictions and endpoints used. It is thus error-prone and not recommended.

Third-party solutions

Let me know which third-party solutions you’d recommend: Get in touch.

Last modified June 20, 2024