Make WordPress Core

Opened 7 years ago

Last modified 23 months ago

#40088 new defect (bug)

Stop creating the `wp_links` database table

Reported by: johnjamesjacoby's profile johnjamesjacoby Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 3.5
Component: Database Keywords: 2nd-opinion has-patch close
Focuses: Cc:

Description

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 7 years ago.
Basic patch to remove the links db table from schema.php

Download all attachments as: .zip

Change History (9)

#1 @SergeyBiryukov
7 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
7 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
7 years ago

@SergeyBiryukov 

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?

@lukecavanagh
7 years ago

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

#4 @lukecavanagh
7 years ago

  • Keywords has-patch added

#6 follow-up: @swissspidy
7 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.


5 years ago

#8 in reply to: ↑ 6 @desrosj
23 months ago

  • Keywords close added
  • Milestone changed from Awaiting Review to Future Release

Replying to swissspidy:

Related: #42136.

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

I'd like to restart discussion around this. I've created #56362 to discuss a larger plan to finish executing this. I'm marking as a close candidate pending agreement that the API should be moved into the plugin on that ticket.

Note: See TracTickets for help on using tickets.