Categories
Featured WordPress

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
wp-content/advanced-cache.php
Caching functionality
When WP_CACHE is set true.
wp-content/db.php
Replaces WP’s default database handling.
Always.
wp-content/db-error.php
Custom DB error message.
Completely replaces the error page that usually says Error establishing a database connection.
Database Error
wp-content/install.php
Custom install scripts. Allows someone to override wp_install() or any other function in wp-admin/includes/upgrade.php
WordPress installation
wp-content/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.
wp-content/object-cache.php
Functionality specifically for an object cache.
Always.
wp-content/sunrise.php
Very early loading functions before multisite starts to load.
When SUNRISE is true. Multisite only.
wp-content/blog-deleted.php
Custom error message when loading a deleted subsite.
Attempting to access a deleted subsite. Multisite only.
wp-content/blog-inactive.php
Custom error message when loading an inactive subsite. Attempting to access an inactive subsite. Multisite only.
wp-content/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.

Advertisements

By <span class='p-author h-card'>Brandon Kraft</span>

My life is an open-source book.

Leave a Reply