Publishing changes for a page through SQL

Overview

If you have multiple changes in draft state and you would like to publish the pages in bulk, you will need to accomplish this programmatically through SQL.

 

Prerequisites

 

Solution

To publish changes for a specific page

  1. Go to the site's DNN Instance.
  2. Open the Persona bar.
  3. Navigate to Settings > Site Settings > SQL Console.
  4. Run the following query to find the TabID after replacing %PAGENAME% with the name of the page.

    SELECT * FROM tabs WHERE tabname LIKE '%PAGENAME%'
  5. If you need to publish a specific version, you can use the process steps listed in Viewing the Latest Page Versions to find the specific version in the Page History table.
  6. Run the following query to publish the changes after replacing %TabID% and %version% acquired from the previous steps as needed.

    UPDATE TabVersions SET IsPublished = 1 WHERE TabID = %TabID% AND version = %version%;
  7. Click on the Run Script button. The script execution output will be displayed at the bottom of the page.

 

To publish changes for all pages

  1. Go to site's DNN Instance.
  2. Open the Persona bar.
  3. Navigate to Settings > Site Settings > SQL Console.
  4. Click on Upload File.
  5. Upload the attached query.
  6. Click on the Run Script button. The script execution output will be displayed at the bottom of the page.

 

Testing

Visit the affected page(s) and you should be able to see the changes published.

Attachments

Comments

0 comments

Please sign in to leave a comment.