Make WordPress Core

Opened 3 years ago

Closed 4 weeks ago

#42033 closed enhancement (maybelater)

Allow automatic installation and updates for drop-in plugins

Reported by: johnbillion Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Plugins Keywords: 2nd-opinion
Focuses: Cc:


Plugins which provide drop-in functionality for advanced caching and database drivers (eg. wp-content/advanced-cache.php, wp-content/db.php) always require a manual step from the user during installation to move the corresponding file into the root of the wp-content directory.

Such plugins also cannot take advantage of automatic updates, as the user is still required to perform this manual step after the update.

It should be possible for such a plugin to specify a header which tells WordPress this file is a drop-in plugin. During installation or an update, the presence of such a header would cause WordPress to automatically copy the file into the wp-content directory according to some rules:

  • During installation, copy the file over if a file of the same name does not already exist.
  • During an update, copy the file over only if a file of the same name and with the same plugin name already exists.
  • Only allow the header to be present on files supported by _get_dropins().

The header could look like this:

Plugin Name: My Database Class
Drop-in: true

This syntax resembles the Network: true syntax for plugins which can only be network-activated when Multisite is in use.

Some plugins (eg. W3 Total Cache) contain multiple drop-ins which are only put into place when the corresponding module is enabled. Such plugins would continue to operate as they currently do, without specifying the Drop-in: true header.

Change History (1)

#1 @johnbillion
4 weeks ago

  • Milestone Awaiting Review deleted
  • Resolution set to maybelater
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.