WordPress Drop-In Plugins?

You know all about WordPress plugins and may have heard of Must-Use plugins, but what about “Drop-Ins”?

In WordPress, there are three types of plugins:

  • Regular plugins – in /wp-content/plugins/ and can (generally) be activated/deactivated/updated via wp-admin’s UI.
  • Must-Use plugins – in /wp-content/mu-plugins/. Only PHP files in the mu-plugins directory itself are detected and they are always loaded—you “must use” them. You can’t deactivate them or update them via UI. You must delete or move the file to deactivate and must manually update via FTP or some other out-of-WordPress method.
  • Drop-Ins plugins – in the wp-content but only specific file names. They replace/augment very specific functionality within WordPress.
File name
Purpose
Loaded
advanced-cache.php
Caching functionality
When WP_CACHE is set true.
db.php
Replaces WP’s default database handling.
Always.
db-error.php
Custom DB error message.
Completely replaces the error page that usually says Error establishing a database connection.
Database Error
install.php
Custom install scripts. Allows someone to override wp_install() or any other function in wp-admin/includes/upgrade.php
WordPress installation
maintenance.php
Custom maintenance message. Completely replaces the Briefly unavailable for scheduled maintenance. Check back in a minute. error page.
During plugin/theme/etc updates.
object-cache.php
Functionality specifically for an object cache.
Always.
sunrise.php
Very early loading functions before multisite starts to load.
When SUNRISE is true. Multisite only.
blog-deleted.php
Custom error message when loading a deleted subsite.
Attempting to access a deleted subsite. Multisite only.
blog-inactive.php
Custom error message when loading an inactive subsite.Attempting to access an inactive subsite. Multisite only.
blog-suspended.php
Custom error message when loaded a suspended site.
Attempting to access a suspended subsite. Multisite only.

The list is very specific and, in many cases, providing a quick replacement to an error page where it may not make sense to try to add via hooks or filters.

The kicker is the caching ones—advanced-cache.php or object-cache.php—are often added by the installation/activation functions of caching plugins but are not always removed when uninstalling. If the caching plugin is deleted via the file manager instead of a typical deactivation, it wouldn’t be able to delete the drop-in either.

If you run into situations where you’re trying to debug something and it seems like there is mysteriously cached items. Check out the wp-content directory and try renaming those files to force-deactivate a cache if there are seemingly no normal caching plugins active.

Comments

5 responses to “WordPress Drop-In Plugins?

  1. shhivalilla Avatar
    shhivalilla

    Nice article. Thank U.
    Can you tell, how to remove those Drop-ins section and is it harmful to our blog if we delete Drop-ins from the wp-content folder.

    1. Brandon Kraft Avatar

      They have to be deleted directly from the file system (FTP, SSH, hosting platform’s file manager, etc).

      What will happens depends on what they are doing. Deleting a caching one would likely result it poorer performance. Deleting a database one could render your site useless and totally broken. Generally, unless you’re doing some major work on your site, you won’t want to touch them.

  2. Codi Avatar
    Codi

    Thank you so much for this. I had a stray advanced-cache.php that was causing some issues. Renaming it helped.

  3. Taisawebdesigner Avatar

    I am trying to clean a site that is giving us some odd problems, and found this for the first time… What is this about? Who creates this file?

    1. Brandon Kraft Avatar

      Depends on the file. Caching plugins or hosting providers are the usual actors I’ve seen. Hosting providers, namely managed providers but often others if you use their WordPress installer, will add them if their platform offers caching out of the box or something like that.

Leave a Reply