Drupal is a registered trademark of Dries Buytaert
Release: Leaflet 10.4.11 Minor update available for module leaflet (10.4.11). Release: Session Inspector 1.0.8 Minor update available for module session_inspector (1.0.8). Release: Migrate QA 2.0.4 Minor update available for module migrate_qa (2.0.4). Release: CKEditor Description List 3.0.0 Major update available for module ckeditor_descriptionlist (3.0.0). Release: FlowDrop 2.4.0 Minor update available for module flowdrop (2.4.0). Release: JWT Token Refresh 1.0.4 Minor update available for module jwt_token_refresh (1.0.4). Release: ConReg 1.0.0-beta1 First beta version released for module conreg (1.0.0-beta1). Release: AI Image Studio 1.0.0-beta8 New beta version released for module ai_image_studio (1.0.0-beta8). Usage Milestone: Role Theme Switcher Module role_theme_switcher crossed 1,000 active installs. Module Revived: Decoupled Router 2.0.7 Module decoupled_router updated after 11 months of inactivity (2.0.7).

Link Magician helps manage broken links and media references within your Drupal content. It automatically converts hardcoded links into usable entity links and transforms unmanaged files into proper media entities, while also providing detailed logs of all changes and any issues it couldn't resolve.

Link Magician scans for faulty/hardcoded links or improperly linked/referenced files and images (found in 'rich text'). Hardcoded links are converted to LinkIt-compatible entity links and files which are referenced directly (unmanaged files) are converted to media entities and linked properly. Just as important, Link Magician also provides extensive logging showing every change it makes and keeping track of faulty things it can't fix so that those may be processed manually.

Features

  • Batching. (a necessity for lots of content, but you'll appreciate the ability to specify batch sizes and limits if you need to 'babysit' the process.)
  • Extensive logging ("Tracking")
  • Includes optional sub-modules that add support for:
    • Layout Builder
    • Paragraphs

Installation

Install as you would normally install a contributed Drupal module. For further information, see Installing Drupal Modules.

Post-Installation

(Optional) Install sub modules.

To enable Paragraphs support

drush pm:e link_magician_paragraphs

To enable Layout Builder support

drush pm:e link_magician_layout_builder

Configuration

At a minimum, update the Base URI and Additional Host settings on the configuration page (/admin/config/system/link_magician).

note the configuration and settings for Link Magician need some work (issue #3584762)

Base URI

This main URL the site; this is used in the logic that checks for redirects that may be redirected by something other than Drupal.

On a production site, this should be the same as the url that users access the site with (ie, https://www.example.com/).

On a development sandbox/server, it would be the address you access the development server at (ie, http://example.ddev.site/)

Additional Hosts

Add any hosts to treat as being on this site. (ie. 'www.example.com'/'example.com')

Additional Requirements

Redirect

Drush 13

Linkit

Usage

Out of the box, you'll have a few Drush commands available

backstop

Useful for comparing before/after (see testing.md)

drush link_magician:backstop {batchid} > backstoplinks.json

purge

Truncate the Link Magician tables in the database.

drush link_magician:purge

tidy

This is where the magic happens, run the tidy process. The help option is your friend.

drush link_magician:tidy --help

Activity

Tracked releases
5
Tracked since
Apr 2026
Latest release
1 month ago
Releases (12 mo)
5 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Release date
1.0.0-rc1 Pre-release Jul 10, 2026
1.0.0-alpha3 Pre-release Jun 27, 2026
1.0.0-alpha2 Pre-release Apr 27, 2026
1.0.0-alpha1 Pre-release Apr 27, 2026
1.0.x-dev Dev Apr 10, 2026