9.9 KiB
Fix 'Plugin file does not exist.' Notices
Easily remove references to deleted plugins that cause "Plugin file does not exist" errors in your WordPress admin.
Description
Have you ever deleted a plugin directly from the server or database and then been stuck with annoying error notifications that can't be cleared?
"The plugin folder-name/file-name.php has been deactivated due to an error: Plugin file does not exist."
This small utility plugin adds missing plugins to your WordPress plugins list and provides a "Remove Reference" link, allowing you to safely clean up invalid plugin entries with one click.
Key Features
- Adds missing plugins directly to your plugins list
- Provides a simple "Remove Reference" action link
- Works with both single site and multisite WordPress installations
- Includes helpful notifications explaining how to fix plugin errors
- One-click auto-scroll to find missing plugins in large sites
- Clean, user-friendly interface following WordPress design patterns
How It Works
When WordPress detects a plugin file that no longer exists but is still referenced in the database as active, it displays an error notice. This plugin:
- Detects all missing plugin references in your database
- Adds them to your plugins list with "(File Missing)" indicators
- Provides a "Remove Reference" link to safely remove them
- Shows clear notifications guiding you through the cleanup process
Use Cases
- You've accidentally deleted a plugin via FTP
- A plugin was removed by another admin but references remain
- You've migrated from another site and have leftover plugin references
- Your hosting provider removed a plugin but didn't clean the database
Installation
From WordPress.org:
- Visit Plugins > Add New in your WordPress admin
- Search for "Fix 'Plugin file does not exist.' Notices"
- Click "Install Now" and then "Activate"
Manual Installation:
- Download the plugin ZIP file
- Go to Plugins > Add New > Upload Plugin
- Upload the ZIP file
- Activate the plugin
Usage
- After activation, navigate to Plugins > Installed Plugins
- If you have missing plugin errors, you'll see them in your plugins list with "(File Missing)" markers
- Click the "Remove Reference" link next to any missing plugin
- The reference will be removed, and the error notification will disappear
Frequently Asked Questions
Is it safe to remove plugin references?
Yes, this plugin only removes entries from the WordPress active_plugins option, which is safe to modify when a plugin no longer exists. It doesn't modify any other database tables or settings.
What happens after I remove a reference?
The plugin entry will be removed from your active plugins list, and the corresponding error notification will no longer appear after you refresh the page.
Can I use this plugin on a multisite installation?
Yes, the plugin works on both single sites and multisite installations. It properly handles network-activated plugins as well.
How do I know which plugin references should be removed?
The plugin will only show "Remove Reference" links for plugins that are listed in your database but don't actually exist in your plugins directory. These are safe to remove.
Will this break my site?
No. Since the plugin is only removing references to plugins that no longer exist, removing these references won't affect your site's functionality. In fact, it's cleaning up remnants that might be causing issues.
What if I accidentally remove a reference I shouldn't have?
If you remove a reference to a plugin that you later want to reinstall, simply install the plugin again and activate it normally.
Do I need to keep this plugin installed and active after notices are cleared?
Although this plugin consumes minimal disk space, and doesn't run unless you are on the /wp-admin/plugins.php page, you don't need to keep it active or installed if you don't have this notice to clear — but it is safe to, if you just want it as a part of your overall WordPress stack of enhancements and conveniences.
Screenshots
- Error message with explanation notification
- Missing plugin shown in the plugins list with "Remove Reference" link
- Auto-scroll feature that highlights the missing plugin
Developers
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch:
git checkout -b feature/amazing-feature
- Commit your changes:
git commit -m 'Add some amazing feature'
- Push to the branch:
git push origin feature/amazing-feature
- Submit a pull request
Technical Details
The plugin works by:
- Filtering the
all_plugins
array to add missing plugins - Adding a custom "Remove Reference" action link via
plugin_action_links
- Adding helpful notifications near error messages
- Providing a secure method to remove plugin references from the database
Changelog
1.6.12
- Added WP ALLSTARS as a co-author
- Updated author information and links
- Added author websites to plugin description
- Fixed issue with multiple author URLs
1.6.11
- CRITICAL FIX: Completely removed auto-deactivation prevention code that was causing fatal errors
- Simplified plugin functionality to focus on core features only
- Improved compatibility with various WordPress configurations
- Ensured plugin works correctly when other plugins are deleted
1.6.10
- Fixed critical error that could occur when a plugin folder is deleted
- Improved error handling with try/catch blocks
- Added more specific checks for the plugins page
- Enhanced compatibility with various WordPress configurations
- Made the code more defensive to prevent potential issues
1.6.9
- Fixed issue with notices not appearing below WordPress error messages
- Improved JavaScript detection of WordPress error notices
- Prevented WordPress from automatically clearing error notices on page refresh
- Added multiple timing attempts to ensure notices appear correctly
- Enhanced error notice targeting for better compatibility
1.6.8
- Fixed notice positioning to appear directly below WordPress error messages
- Improved notice width to match WordPress error messages
- Updated explanatory text for better clarity
- Fixed issue with notices not appearing in some cases
- Improved JavaScript detection of WordPress error messages
1.6.7
- Fixed duplicate notices issue by removing PHP-generated notice
- Simplified notice system to only show one notice below WordPress error
- Ensured consistent terminology with "Remove Notice" text
- Optimized plugin detection with caching to improve performance
- Fixed JavaScript to correctly handle multiple error messages
1.6.6
- Fixed issue with "Remove Notice" link not appearing on missing plugin rows
- Fixed issue with automatic removal of plugin references without user action
- Fixed notice positioning to ensure it appears below error messages
- Restored pointer triangle to indicate relationship with error message
- Improved detection of missing plugins in the plugin list
- Enhanced scroll functionality to work with all plugin types
1.6.5
- Fixed duplicate notices issue - now only one notice appears below error messages
- Changed notice heading to "Fix Plugin Does Not Exist Notices ☝️"
- Updated explanatory text to be more clear about the removal process
- Changed "Remove Reference" link text to "Remove Notice" for better clarity
- Made "(File Missing)" text bold and red for better visibility
- Fixed scroll functionality to work with all plugin rows
- Improved JavaScript to prevent multiple notices from appearing
1.6.4
- Updated version management to ensure consistent patch version increments
- Improved documentation for version update process
- Enhanced AI workflow files with detailed version increment instructions
1.6.3
- Fixed Git Updater repository URLs to use full repository paths
- Corrected Update URI configuration for proper update detection
- Improved version management following semantic versioning
- Updated organization name from 'WP All Stars' to 'WP ALLSTARS'
- Updated namespace from 'WPAllStars' to 'WPALLSTARS'
1.6.2
- Updated POT file version for consistency
- Improved JavaScript localization with proper fallbacks
- Enhanced code quality for WordPress.org submission
- Added Git Updater configuration with Update URI
- Added update server URL configuration
1.6.1
- Added AI assistant guide and workflow documentation
- Added detailed release process documentation
- Added feature development guidelines
- Added bug fixing procedures
- Added code review standards
1.6.0
- Added full translation support with POT file
- Added JavaScript localization for better multilingual support
- Added plugin constants for improved code organization
- Added Git Updater support for updates from GitHub and Gitea
- Updated code to follow WordPress internationalization best practices
- Improved asset loading with version constants
- Added smart update detection based on installation source
1.5.0
- Improved compatibility with WordPress 6.4
- Enhanced error detection for plugin references
- Minor UI improvements for better visibility
- Accessibility enhancements for screen readers
License
This project is licensed under the GPL-2.0+ License - see the LICENSE file for details.
Support
For support, please visit WP ALLSTARS.