New Lesson Deployment Instructions

All new lessons should be written, copy-edited, and finalized on the test site before deploying to live.

Important note

The chapter map and index data are saved in learncpp-data.php as live PHP table data.

The currently installed version of WordPress should prevent syntax errors from being saved to this file.

In the event that something goes wrong and a breaking change is somehow saved to learncpp-data.php, manually fix/revert the change. You may need to go to the Plugins list and reactivate the LearnCpp Lesson Map plugin.

Deploying the lesson

1) Create new post on live site.
2) Paste the title from test to live and save a draft.
3) Edit the permalink and remove the lesson number prefix.
4) Paste the lesson body from test to live.
5) Preview the article and make sure it looks okay (check all [link] tags to ensure they’re resolving correctly). Note: The [link prevnext] at the bottom will be broken at this point.
6) Publish the article.
7) Hover over the “Edit Post” link and note the ID that the post was given. This is now the canonical ID for this post.

At this point, the article is technically live, but there should be no inbound links to it.

Linking the lesson (for lessons in chapters that exist in the chapter map)

Note: If the chapter the new lesson is being published in hasn’t been migrated to the chapter map yet, please execute the next section instead.

8) Go to the chapter map ( and add the lesson ID. Save the lesson map.
9) Check the main page of the site and make sure the new lesson now shows up.
10) Check the lesson you just published to make sure the [link prevnext] at the bottom is now resolving correctly.
11) Check the previous and next lessons to make sure the [link prevnext] at the bottom has correctly updated.

Linking the lesson (for lessons in chapters that haven’t been added to the chapter map yet)

8) Get the post IDs of the previous and next lessons in sequence.
9) Update the [prevnext] block of the just published lesson to include the previous and next lesson IDs
10) Update the previous and next lesson’s [prevnext] block to link to the just published article.
11) Update the main page table and link to the new lesson.

Update the rest of the site

12) Update the chapter summary with any new information pertinent to the new lesson.
13) Update the index ( with any new terms pertinent to the new lesson.
14) Visit the index page to ensure the page’s cache is refreshed.