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

Pro:

  • returns a guaranteed accurate page count

Contra:

  • 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 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 not recommended.

Getting the page count via Analytics (Confluence Cloud)

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

Third-party solutions

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

Last modified March 13, 2024