Make WordPress Core

Opened 5 years ago

Last modified 2 years ago

#40088 new defect (bug)

Stop creating the `wp_links` database table

Reported by: johnjamesjacoby Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 3.5
Component: Database Keywords: 2nd-opinion has-patch
Focuses: Cc:


In WordPress 3.5 (2012) the Links feature was disabled by default in new WordPress installations, and was hidden for old installations that had no links.

See #21307.

Every new WordPress site since then (including multisite) has continued to create an empty wp_links database table for a feature that was sunsetted 5 years ago.

Attachments (1)

40088.diff (1.2 KB) - added by lukecavanagh 5 years ago.
Basic patch to remove the links db table from schema.php

Download all attachments as: .zip

Change History (8)

#1 @SergeyBiryukov
5 years ago

There's a Link Manager plugin to restore the feature, the table creation code should probably be moved there, maybe with all the UI that remains hidden in the admin.

#2 @johnjamesjacoby
5 years ago

  • Version set to 3.5

I don't think this will just be as easy as removing the table from schema.php, as there is the database option to set link_manager_enabled back to 1, and also a plugin to re-expose the Links functionality by filtering that option.

Still, it seems wasteful to be creating all these empty database tables, particularly for web-hosts.

Each empty table occupies approximately 16 KiB. Every 1 million WordPress sites creates 1.02GB of empty databases.

#3 @lukecavanagh
5 years ago


So move the database creation for the links tables into the plugin, then remove the db table creation from the schema.php in core then?

5 years ago

Basic patch to remove the links db table from schema.php

#4 @lukecavanagh
5 years ago

  • Keywords has-patch added

#6 @swissspidy
4 years ago

Related: #42136.

The original goal was to have all the code in the plugin, things just never got that far.

This ticket was mentioned in Slack in #core by donmhico. View the logs.

2 years ago

Note: See TracTickets for help on using tickets.