Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
PHP

How to Disable Automatic URL Linking in WordPress Comments

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To stop WordPress from turning plain-text URLs in comments into clickable links, remove the core make_clickable callback from the comment_text filter at priority 9:

remove_filter( 'comment_text', 'make_clickable', 9 );

Run this code after WordPress registers its default comment filters. A small site-specific plugin is usually the most durable location; an active theme callback is another option.

What this change does

WordPress core adds make_clickable to comment_text at priority 9. That function converts plain-text URLs and email addresses in displayed comment text into links. Removing that one callback stops the automatic conversion while leaving comments enabled.

Other comment formatting callbacks can continue to run, including text formatting, tag balancing, emoticon processing and paragraph formatting. This change affects how comment text is rendered; it does not rewrite content already stored in the database.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Install the filter removal

Option 1: Use a site-specific plugin

Create a small PHP file in wp-content/plugins/, for example site-comment-settings.php:

<?php
/**
 * Plugin Name: Site Comment Settings
 */

remove_filter( 'comment_text', 'make_clickable', 9 );

Activate it under Plugins → Installed Plugins. A site-specific plugin keeps the behavior when you change themes.

Option 2: Add it through the active theme

Place the same removal in code that runs after the theme setup begins:

add_action( 'after_setup_theme', function () {
    remove_filter( 'comment_text', 'make_clickable', 9 );
} );

Use a child theme or another update-safe customization location rather than editing a parent theme directly. Theme-based code is convenient when the theme is where you intentionally maintain custom behavior, but it will stop applying if that theme is replaced.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Option 3: Use a snippet manager

A snippet-management plugin can load the one-line removal, but it is optional. The underlying change is the standard WordPress filter API, not a feature that requires a particular commercial product.

Why timing and priority matter

remove_filter() can remove a callback only after that callback has been registered. WordPress core registers make_clickable on comment_text at priority 9, so the removal must execute later than that registration and must use the same hook, callback and priority. The after_setup_theme example provides a practical loading point for theme code; a plugin loaded normally can remove the callback directly when its file runs.

What this does not change

  • Comment author website field: the commenter may still be able to enter a site URL. Removing that field is a separate form-customization task.
  • URL submissions: comments containing URLs can still be submitted unless moderation, validation or another plugin blocks them.
  • Stored comment content: the filter changes front-end display, not the saved text.
  • Links added elsewhere: a theme, page builder or plugin may create links through a separate rendering path.

Check the result

  1. Deploy the plugin or theme code and clear any page or object cache that serves rendered comments.
  2. Submit or approve a test comment containing a plain URL such as https://example.com.
  3. Open the comment on the public page and confirm that the URL appears as text rather than as a clickable anchor.
  4. If it is still clickable, inspect the active theme and plugins for additional comment filters or markup-generation code.

Browser behavior can also make some text appear recognized without WordPress having added an HTML link, so inspect the page source or element markup when diagnosing the result.

Troubleshooting persistent links

The removal runs too early

If another customization adds the core callback after your removal, your code will no longer match the final filter stack. Move the removal to a later execution point and verify the callback is registered at priority 9.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A plugin or theme adds its own link

The researched core callback is only the default path. A theme, plugin or page builder can apply a different filter or generate an anchor directly. Temporarily review those customizations, then target their specific callback rather than removing unrelated comment formatting.

You are viewing cached HTML

Purge page, object and CDN caches, then test in a private browser window. Confirm the rendered markup before changing the PHP code.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Undo the change

Delete the added remove_filter( 'comment_text', 'make_clickable', 9 ); code, or deactivate the site-specific plugin or snippet. WordPress’s default callback will then participate in comment-text rendering again, provided no other customization changes the filter stack.

Choosing where to put it

Location Survives a theme switch? Best fit
Site-specific plugin Yes Site behavior that should remain independent of presentation
Child-theme setup code No Owners who deliberately maintain custom behavior with the theme
Snippet manager Usually, while the snippet remains active Sites already using a trusted code-snippet workflow

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Read next

Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.