While organizing my blog’s external links recently, I noticed that some links might carry the following tracking parameter:
?utm_source=chatgpt.com
For example:
https://bigmodel.cn/special_area?utm_source=chatgpt.com
These parameters do not usually affect page access, but they make the links look lengthy and are unnecessary to keep. Therefore, I planned to use the WordPress Better Search Replace plugin to bulk replace ?utm_source=chatgpt.com with nothing.
However, during the actual operation, I first encountered a request processing failure, and subsequently found that the database contained no matching content to replace.
1. Initially selecting all database tables led to a request processing failure
I initially filled in the following in Better Search Replace:
- Search for:
?utm_source=chatgpt.com - Replace with: left blank
Run as dry run: checked
To confirm whether this parameter existed anywhere in the entire database, I also selected almost all database tables.
After running it, the plugin did not return search results, but instead prompted:
There was an error processing the request. Try reducing the “Maximum Page Size”, or contact support.

This issue did not mean the search content was entered incorrectly; it was more likely caused by selecting too many database tables at once.
My WordPress database contains a large amount of posts, post meta, Yoast SEO indexes, and other plugin data. Among these:
wp_postsis about 357.52 MB;wp_postmetais about 180.56 MB;- It also contains many data tables for comments, categories, users, Yoast SEO, and more.
Scanning all database tables at once significantly increases the processing load on PHP, the database, and the server, making it more prone to triggering timeouts or request size limits.
2. Post content is mainly stored in the wp_posts table
The goal this time was only to clean up tracking parameters within the blog post content, so there was no need to scan all database tables.
WordPress post bodies, titles, excerpts, pages, revisions, and other content are primarily stored in the wp_posts table.
Therefore, I reran Better Search Replace and selected only:
wp_posts
Keeping the other settings unchanged:
- Search for:
?utm_source=chatgpt.com - Replace with: left blank
Case-Insensitive: uncheckedReplace GUIDs: uncheckedRun as dry run: kept checked

Here, Run as dry run must remain checked.
The dry run mode only checks how many instances in the database can be matched without actually modifying the database. Once you confirm the results are fine, unchecking it and performing the actual replacement is much safer.
3. After selecting only wp_posts, the dry run completed successfully
After rerunning, Better Search Replace no longer showed a request processing error and successfully returned the dry run results:
DRY RUN: 1 tables were searched, 0 cells were found that need to be updated, and 0 changes were made.
That is:
- 1 database table searched;
- 0 cells found that need updating;
- 0 actual changes made.

This shows that selecting only wp_posts is a viable approach, and the previous error was indeed related to the excessively large scope of scanned database tables.
However, this search did not find an exact match for ?utm_source=chatgpt.com.
Since the dry run result was 0, there was no need to uncheck Run as dry run and run the actual replacement again. Even if run formally, nothing would be modified.
4. Why no matching content was found
There could be several reasons why this parameter was not found in the database.
1. Parameters in historical posts have already been cleaned
When organizing the blog later on, I had already started actively removing tracking parameters from external links.
Therefore, links that originally contained ?utm_source=chatgpt.com might have already been modified into clean links during post editing.
For example:
https://bigmodel.cn/special_area
2. The parameter is not the first query parameter in the link
When utm_source is the first parameter in a link, it is usually written as:
?utm_source=chatgpt.com
But if other query parameters precede it, it might be written as:
&utm_source=chatgpt.com
In WordPress HTML content, it might also be saved as:
&utm_source=chatgpt.com
These forms are not equivalent to ?utm_source=chatgpt.com, so they would not be matched by this exact search.
3. The actual links use other source parameters
Some links might also carry other tracking parameters, for example:
utm_mediumutm_campaignutm_contentutm_term
Searching only for utm_source=chatgpt.com will not find other types of parameters.
5. Should you directly search for utm_source=chatgpt.com?
To broaden the match scope, you could also try searching for:
utm_source=chatgpt.com
This way, regardless of whether the parameter is preceded by ?, &, or &, it could be found.
However, it is not recommended to directly bulk replace this string with nothing.
For example, if the original link is:
https://example.com/?id=123&utm_source=chatgpt.com
After removing only utm_source=chatgpt.com, the link might become:
https://example.com/?id=123&
Although it can still be accessed in most cases, a redundant & will remain at the end.
If different forms of the parameter do exist in the database, a safer approach is to perform dry runs separately for:
?utm_source=chatgpt.com&utm_source=chatgpt.com&utm_source=chatgpt.com
After confirming the number of matches and their locations for each form, you can decide whether to replace them individually.
6. What to note when using Better Search Replace
1. Back up the database first
Better Search Replace modifies the database directly.
Even if you are just removing a simple parameter, you should always create a database backup first using UpdraftPlus, WP-CLI, or a server management tool.
2. Always use dry run mode the first time
First, check Run as dry run to see:
- How many tables were searched;
- How many cells were found;
- Which database fields contain matching content.
Only after confirming the results are reasonable should you uncheck dry run and perform the actual replacement.
3. Do not select all database tables without a purpose
If the goal is to modify post content, you usually only need to check wp_posts.
Only when you clearly know that links might be saved in post meta, plugin settings, or other locations do you need to also check:
wp_postmetawp_options- Other relevant plugin data tables
Selecting all database tables at once not only takes longer to process but is also more likely to cause timeouts and server errors.
4. Do not check Replace GUIDs
A post’s guid field is primarily used to identify content and should not be modified for a routine link cleanup.
Therefore, Replace GUIDs does not need to be checked for this operation.
5. Do not proceed with the actual replacement if the dry run result is 0
If the dry run shows no matching content, the actual run will not produce any changes either.
At this point, you should check whether the search string is accurate, or continue running dry runs for other possible parameter forms, rather than repeatedly executing the actual replacement.
7. Final outcome of this operation
This attempt to clean up ?utm_source=chatgpt.com using Better Search Replace ultimately did not modify the database.
However, through this test, it can be confirmed that:
- Scanning all database tables is prone to triggering request processing errors;
- When only processing post content, selecting
wp_postsis sufficient; - A dry run should always be performed before the actual replacement;
- No exact match for
?utm_source=chatgpt.comwas found in the database this time; - The dry run result was 0, so there was no need to proceed with the actual replacement.
When organizing blog content in the future, I will continue to use clean external links.
For tracking parameters like utm_source, utm_medium, and utm_campaign, as long as they are not necessary for normal page access or functionality, I will remove them directly before publishing the post to avoid having to clean them up in bulk via the database later.

