Recently, I have been working on historical articles in my WordPress site, including backfilling Chinese summaries, migrating old code formats, handling SyntaxHighlighter shortcodes, and performing overwrite translations for the corresponding English articles.
For previous related processes, please refer to:
This work has been going on for quite a long time. The historical articles contain a mix of different formats—Gutenberg, Classic Editor, Code Block Pro, SyntaxHighlighter, <pre>, <code>, and various mixed content—making it difficult to resolve everything with a single simple batch replacement.
Now, this round of historical article migration is finally and officially wrapping up.
Moreover, before preparing to publish this post, I have already officially deactivated SyntaxHighlighter Evolved.
For now, it is only deactivated, and the plugin files have not been immediately deleted. Next, I plan to wait about 5 days for the previously generated old page caches to naturally expire before completely deleting the plugin.
1. 67 fixed batches and 1281 historical articles fully processed
The final history migration status is:
- Fixed batches: 67
- Fixed posts: 1281
remaining=0integrity=ok- Latest incomplete batch: None
- All batches completed
The execution evidence retains:
completed=1279failed=2pending=0translation_started=0
The two failed entries here are historical execution evidence and do not mean there are currently two unprocessed articles.
The final process status has fully converged, remaining=0, and there are currently no incomplete batches.
![[Figure 1: Final status of historical article migration, 67 fixed batches and 1281 articles all completed]](https://media.shuijingwanwq.com/2026/08/1-64-1024x188.png)
After completing the historical article migration, I started considering another long-delayed issue:
Can SyntaxHighlighter Evolved finally be retired from this WordPress site?
2. Why SyntaxHighlighter cannot be directly deleted
Although the code format migration for many historical articles was already completed, I was still concerned about residual [text], [php], [json], [js], and other SyntaxHighlighter shortcodes in the content.
If an article originally relied on shortcodes like the following to generate code highlighting:
[bash]
Actual code or terminal output
[/bash]Then directly deleting the plugin could cause these shortcodes to reappear as plain text on the page, and the original code blocks would lose their proper rendering.
Therefore, before actually retiring SyntaxHighlighter, I decided to perform an independent task after all historical migrations were complete:
SyntaxHighlighter retirement audit
This time, I would not automatically modify articles; the sole purpose was to identify all Chinese articles worth manual review.
3. You cannot just search for [text], [php], [json], and [js]
Initially, I just thought about re-searching for a few previously common shortcodes.
But after actually checking the runtime registration of SyntaxHighlighter Evolved 3.7.2 in the production environment, I found it to be far more complex.
In addition to the three generic shortcodes:
sourcecodesourcecode
different brushes also registered many language aliases, such as:
bashshellphpgogolangjsjavascriptsqltextplainpythonjavahtmlxmlyaml
and so on.
I ultimately confirmed that 65 shortcodes actually needed to be considered in the production runtime.
This also meant that if I just manually searched for a few strings I remembered, it would be easy to miss some historical articles that still truly depended on the plugin.
Therefore, instead of simply using a few fixed keywords for grep, I added a separate retirement audit scanner that scans based on the shortcodes and aliases actually registered by the production plugin.
4. Re-syncing production data instead of continuing to use old snapshots
Because the previous historical migration had been going on for a while, and I had manually modified many articles during that time, I did not continue using the old raw data saved during the historical phase.
Instead, I re-read the latest current data from the production WordPress:
post_type=postpost_status=publish- Polylang Chinese articles
The English articles were not scanned separately.
The reason is that if a Chinese article needs modification, I will directly modify the Chinese text in the WordPress backend, and then use the existing translation process to overwrite and sync the English article.
In total, I re-read:
1438 published Chinese articles.
The entire data sync was divided into 15 pages:
- First 14 pages, 100 articles each
- Last page, 38 articles
Each page underwent remote and local SHA-256, record count, byte count, JSONL scope, and schema checks.
Final results:
- duplicate
post_id: None - pagination overlap: None
- cursor exceptions: None
- All pages passed integrity checks
After completing this full scan, the results turned out to be much lighter than I expected.
5. Out of 1438 articles, only 14 ultimately required manual review
The final retirement audit statistics are:
- Chinese published posts: 1438
- JSONL pages: 15
- Hit articles: 14
- Total shortcode hits: 58
- Earliest hit article: 2018-09-01 17:34:44
- Latest hit article: 2026-07-21 12:36:24
Only 8 shortcodes actually appeared:
| Shortcode | Hits | Articles involved |
|---|---|---|
source | 19 | 6 |
php | 10 | 2 |
go | 8 | 2 |
sql | 8 | 1 |
text | 5 | 2 |
sourcecode | 4 | 1 |
bash | 2 | 1 |
code | 2 | 1 |
![[Figure 2: Final statistics of the SyntaxHighlighter retirement audit, only 14 out of 1438 articles hit]](https://media.shuijingwanwq.com/2026/08/2-54.png)
This result is very important.
Because it means that after the extensive historical migration, the number of articles that still truly require me to open and verify manually is down to:
14.
At this point, continuing to develop complex automatic migration logic makes little sense.
Directly checking them one by one manually is safer and more efficient.
6. A shortcode hit does not necessarily mean modification is required
The biggest difference between this retirement audit and the previous automatic migration detector is:
It is only responsible for finding candidates, not for determining that an article definitely has a problem.
During the actual review process, I quickly encountered a very typical example.
An article was discussing the shortcode detection issue, and specifically included:
[sourcecode]...[/sourcecode]This was the exact text the article intended to display to the reader.
![[Figure 3: The [sourcecode]...[/sourcecode] in the article content is itself the example text that needs to be displayed]](https://media.shuijingwanwq.com/2026/08/3-48-1024x491.png)
[sourcecode]...[/sourcecode] in the article content is itself the example text that needs to be displayed]However, with SyntaxHighlighter Evolved still active at the time, the frontend would execute it as an actual shortcode.
As a result, what was originally supposed to display:
[sourcecode]...[/sourcecode]was rendered by SyntaxHighlighter into a code block, leaving only the middle:
...Semantically, this article should not be modified at all.
What should truly exit is SyntaxHighlighter’s parsing of this text, not modifying the original article text.
Therefore, although this article was hit by the retirement audit, the final manual judgment was:
Keep the original text, do not modify.
Now that SyntaxHighlighter Evolved has been deactivated, this text—originally meant to display the shortcode itself—will no longer be treated by the plugin as a code highlighting shortcode.
This is also why I never set “shortcode residuals must be zero” as a condition for retiring SyntaxHighlighter from the very beginning.
The appearance of some shortcodes is simply part of the article content.
7. Another type of article must be truly migrated
Another article was completely different.
The backend content saved was:
[bash]
Actual terminal output
[/bash]Here, [bash]...[/bash] was not the article displaying the shortcode itself to the reader, but rather genuinely using SyntaxHighlighter for code highlighting.
![[Figure 4: Historical article still relying on the [bash]...[/bash] shortcode to display terminal output before deactivating SyntaxHighlighter]](https://media.shuijingwanwq.com/2026/08/4-41-1024x491.png)
[bash]...[/bash] shortcode to display terminal output before deactivating SyntaxHighlighter]The code block displayed correctly on the frontend previously precisely because SyntaxHighlighter was parsing this shortcode.
If it is not handled before deactivating the plugin, the original:
[bash]
...
[/bash]would be exposed again as plain text.
Therefore, this type of article must be truly migrated.
My approach was:
- Create a new Code Pro block;
- Only copy
[bash] and [/bash]the actual code content in between;
No longer retain the SyntaxHighlighter shortcode;
Delete the original shortcode block;
Save the Chinese article;
Then overwrite and sync the corresponding English article via the backend.
Ultimately, the actual code is saved in Code Pro, for example:
[root@server example.com]# php example.php
PHP Fatal error: ...
Stack trace:
...rather than saving
[bash] and [/bash]into it.
This way, the code display no longer depends on SyntaxHighlighter.
8. 14 manual reviews, fewer than 5 truly requiring modification
Ultimately, I manually reviewed all 14 candidates.
The number of articles that actually needed modification was fewer than 5.
In other words, the final outcome of this round was roughly:
1438 latest Chinese articles
↓
14 shortcode candidates
↓
All manually reviewed
↓
Truly modified fewer than 5This result further demonstrates that automated scanning and manual judgment should assume different responsibilities.
Automation is well-suited for solving:
“Did I miss anything?”
But for:
“Is this [text] actually a historical shortcode that needs migration, or is it text the article originally intended to display?”
manual judgment combined with the article’s semantics is more reliable.
Ultimately, there is no need to forcibly clean all shortcode-looking text down to zero.
9. The retirement audit is independent of the historical migration process
This time, I did not continue adding logic to the original history migration state machine.
Instead, I separately added:
bin/build-syntaxhighlighter-retirement-audit.pyand the corresponding configuration:
config/syntaxhighlighter-retirement.jsonThe reason for this is quite clear.
The goal of the historical migration detector is:
To safely determine whether an article is suitable for automatic migration.
Therefore, it actively protects or masks:
- Code Block Pro
- Gutenberg code block
<pre><code>- shortcode-looking text within certain code areas
The retirement audit’s goal is completely different.
It focuses on:
As long as it might be worth a manual look, list the article.
Therefore, even if a shortcode appears inside a Code Block Pro, <pre>, <code>, or other complex areas, there is no need to prematurely exclude it automatically.
Ultimately, manual judgment will decide.
This is also a key reason why this full scan of 1438 articles was ultimately narrowed down to 14 manual candidates.
10. Project code also finalized together
After completing the retirement audit of 1438 articles, the 14 manual reviews, and the necessary article modifications, I also performed a Git finalization for the newly added audit tools and the last batch of historical migration state.
Final commit:
e2fd42fCommit message:
feat: add SyntaxHighlighter retirement auditThis time I also ran the full automated tests:
Ran 503 tests
OKFinal historical migration status:
67 fixed batches
1281 fixed posts
remaining=0
integrity=okSyntaxHighlighter retirement audit:
1438 Chinese published posts
14 candidates
58 matchesFinal Git status:
## main...origin/mainWorking tree clean.
![[Figure 5: Final Git commit, 503 tests, historical migration, and SyntaxHighlighter retirement audit all finalized]](https://media.shuijingwanwq.com/2026/08/5-21.png)
At this point, this long-running phase of processing WordPress historical articles can truly come to a stop.
11. Why SyntaxHighlighter Evolved was deactivated before publishing this post
My original plan was:
First complete all manual reviews and modifications, then keep SyntaxHighlighter Evolved active for about 5 days to wait for the cache to naturally expire, and finally uninstall the plugin.
But while actually preparing this post, I realized there was a very practical issue.
This post itself needed to display many historical shortcodes, such as:
[sourcecode]...[/sourcecode]
[bash]...[/bash]
[text]
[php]
[code]If SyntaxHighlighter Evolved remained active, this text—intended solely for display to the reader—could once again be parsed by the plugin as an actual shortcode.
The actual case of [sourcecode]...[/sourcecode] earlier had already proven that this was not a theoretical risk.
Therefore, before officially publishing this post, I have already:
Deactivated SyntaxHighlighter Evolved.
This way, newly generated WordPress pages will no longer execute the shortcodes registered by SyntaxHighlighter.
The shortcode examples used in this post to illustrate historical formats can also be displayed normally according to the article’s original intent, rather than being interpreted by the plugin as code highlighting content once again.
12. Why only deactivate, instead of immediately deleting completely
Although the plugin has been deactivated, I have not immediately deleted the SyntaxHighlighter Evolved plugin files yet.
The main consideration here is still the cache.
The fewer than 5 articles actually modified today may have had old page caches before modification.
Those old caches were generated while SyntaxHighlighter was still active and the articles still relied on the old shortcodes.
I want to leave a time window for these old page caches to naturally expire.
Therefore, the current approach is:
Manual migration completed
↓
Deactivate SyntaxHighlighter Evolved
↓
Do not actively clear cache
↓
Keep plugin files for about 5 days
↓
Let previously generated old page caches naturally expire
↓
Then completely delete SyntaxHighlighter EvolvedHere, it is necessary to distinguish between “deactivate” and “delete”.
After the plugin is deactivated, new WordPress pages will no longer execute SyntaxHighlighter’s PHP logic, nor will they register the related shortcodes.
However, the plugin files are temporarily retained on the server.
This way, even if some previously generated cached pages still reference SyntaxHighlighter’s CSS or JavaScript static assets, the corresponding plugin files temporarily still exist, avoiding the immediate issue of deleted resource files.
After about 5 days, when the old caches from before this round of modifications have mostly naturally expired, I will perform the final plugin deletion.
13. This historical article processing is finally truly over
From initially just wanting to add summaries to old articles, to gradually discovering:
- Classic Editor historical formats
- Gutenberg
- Code Block Pro
- SyntaxHighlighter
- mixed content
- shortcode misjudgments
<pre>/<code>- Chinese and English overwrite translation
- Automated validation
- execution evidence
- failed recovery
- production drift
- manual fixes
The entire issue ultimately evolved into a fairly complete historical content migration process.
Fortunately, the final status is now very clear:
- All 67 fixed batches completed;
- All 1281 fixed historical articles fully processed;
- 1438 latest Chinese articles re-audited fully for SyntaxHighlighter;
- Only 14 entered manual review;
- Fewer than 5 truly required modification;
- SyntaxHighlighter Evolved has been deactivated;
- retirement audit tools have been added to the repository;
- 503 automated tests passed;
- Git working tree is completely clean.
At this point, SyntaxHighlighter is no longer involved in content generation for new pages.
I will also stop tinkering with historical articles.
There is only one very simple final wrap-up action left:
Continue to keep the deactivated SyntaxHighlighter Evolved plugin files for about 5 days, let the previous old page caches naturally expire, and then completely delete the plugin.
Once this step is complete, this long-running WordPress historical code format migration will truly come to an end.

![[Figure 1: Final status of historical article migration, 67 fixed batches and 1281 articles all completed]](https://media.shuijingwanwq.com/2026/08/1-64.png)