How to Fix “Plugin File Does Not Exist” in WordPress

WordPress may occasionally display a message saying that a plugin has been disabled because its file does not exist. This can be alarming, especially when the plugin was working correctly before the update.

In many cases, the plugin is not broken and your settings have not been deleted. The issue may happen because the plugin developer renamed or moved the plugin’s main PHP file in a newer version.

This guide explains why WordPress automatically disables the plugin and how to safely reactivate it.

Quick Solution

To restore the plugin:

  1. Log in to your WordPress dashboard.
  2. Go to Plugins > Installed Plugins.
  3. Find the affected plugin.
  4. Click Update Now to install the latest version.
  5. Refresh the Installed Plugins page.
  6. Locate the plugin again.
  7. Click Activate.
  8. Check the plugin settings and website functionality.

In most cases, your previous settings will remain unchanged because plugin configuration data is normally stored in the WordPress database rather than inside the plugin files.

Why Did WordPress Disable the Plugin Automatically?

WordPress identifies an installed plugin using its directory and main plugin file.

A plugin path may look like this:

wp-content/plugins/example-plugin/example-plugin.php

WordPress stores the active plugin path in the database. If the plugin developer changes the main file name, the stored path may no longer exist.

For example, the previous version may use:

wp-content/plugins/example-plugin/example-plugin.php

The new version may use:

wp-content/plugins/example-plugin/plugin-main.php

WordPress may still look for the old file. Because that file is no longer available, WordPress automatically deactivates the plugin and may display a message similar to:

The plugin has been deactivated due to an error: Plugin file does not exist.

This does not necessarily mean that the plugin files are corrupted. It can simply mean that WordPress needs to register the new main plugin file.

Step-by-Step Fix

Step 1: Back Up the Website

Before updating or reinstalling any plugin, create a backup of:

  • Your WordPress database
  • The wp-content directory
  • The current plugin files
  • Any custom code or plugin modifications

A backup is especially important on WooCommerce, membership, booking, or production websites.

Step 2: Open the Plugins Page

Log in to WordPress and navigate to:

Dashboard > Plugins > Installed Plugins

You may see that the plugin is inactive, missing, or accompanied by an error message.

Step 3: Update the Plugin

If an update is available, click Update Now.

Wait until WordPress confirms that the update was completed successfully.

Do not leave the page while the plugin update is still running.

Step 4: Refresh the Plugins Page

After the update finishes, refresh the page.

This step is important because the WordPress Plugins screen may still display information from the plugin’s previous file structure.

Refreshing forces WordPress to scan the plugin directory again and detect the new main plugin file.

Step 5: Activate the Plugin

Find the plugin in the list and click Activate.

If the main file was renamed correctly by the plugin developer, WordPress should now recognize and activate the new version.

Step 6: Verify the Plugin Settings

Open the plugin’s settings page and confirm that your previous configuration is still available.

Check important items such as:

  • API keys
  • Payment gateway settings
  • Email templates
  • Shortcodes
  • Scheduled tasks
  • Integration settings
  • Custom rules
  • WooCommerce options
  • Booking or form configurations

Plugin settings usually remain available because updating or deactivating a plugin does not normally remove its database records.

However, this depends on how the plugin was developed, so you should always verify the settings manually.

Step 7: Test the Website

After reactivation, test the features controlled by the plugin.

Check both the WordPress dashboard and the front end of the website.

For example:

  • Submit a test form.
  • Add a product to the cart.
  • Complete a test booking.
  • Test the payment process in sandbox mode.
  • Check plugin-generated pages.
  • Review the browser console for JavaScript errors.
  • Check the WordPress debug log for PHP errors.
  • Clear all website and server caches.

What to Do If the Plugin Still Says “Plugin Does Not Exist”

If refreshing the Plugins page does not solve the issue, try the following troubleshooting steps.

Clear WordPress and Server Cache

Clear every active cache layer, including:

  • WordPress caching plugins
  • LiteSpeed Cache
  • Cloudflare
  • Hosting cache
  • Object cache
  • Redis or Memcached
  • Browser cache

Then reopen the Installed Plugins page.

Check the Plugin Directory

Use FTP, SFTP, SSH, or your hosting file manager and open:

wp-content/plugins/

Confirm that the plugin folder exists and contains PHP files.

A valid plugin directory will normally contain a main PHP file with a WordPress plugin header similar to:

<?php
/**
 * Plugin Name: Example Plugin
 * Description: Example plugin description.
 * Version: 2.0.0
 */

Do not rename plugin files manually unless the plugin developer specifically instructs you to do so.

Reinstall the Latest Version

If the update was incomplete:

  1. Download the latest plugin package from the official source.
  2. Create a complete website backup.
  3. Rename the existing plugin directory as a temporary backup.
  4. Upload the latest plugin version.
  5. Return to Plugins > Installed Plugins.
  6. Activate the plugin.
  7. Verify all settings and functionality.

Example:

example-plugin

Temporarily rename it to:

example-plugin-old

Then upload a clean copy of the latest version.

Avoid deleting the old directory until you have confirmed that the new version works correctly.

Check File Permissions

Incorrect permissions can prevent WordPress from reading the new plugin files.

Common permissions are:

Directories: 755
Files: 644

Permissions can vary depending on the server configuration. Contact your hosting provider before changing them when you are unsure.

Enable WordPress Debug Logging

To record plugin-related PHP errors, add or update these lines in wp-config.php:

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );

Then reproduce the issue and check:

wp-content/debug.log

Remove or disable debug logging after troubleshooting a production website.

Check the Server Error Log

The WordPress debug log may not capture every failure. Also inspect the hosting server’s PHP or web server error logs.

Look for errors such as:

  • PHP fatal errors
  • Missing files
  • Permission denied errors
  • Failed includes
  • Incompatible PHP syntax
  • Memory exhaustion
  • Plugin dependency failures

Check the Required PHP and WordPress Versions

The latest plugin version may require a newer version of:

  • WordPress
  • PHP
  • WooCommerce
  • Another dependent plugin

Review the plugin’s official requirements before activation.

Do not upgrade PHP directly on a live website without first testing the website on a staging environment.

What If the Plugin Is Missing Completely?

If the plugin no longer appears on the Plugins page, the update may have failed or removed the plugin directory.

Check the following location:

wp-content/plugins/

If the plugin folder is missing, install a fresh copy from the official WordPress repository or the plugin developer’s website.

After installation, WordPress may reconnect the plugin to its existing database settings.

Will Updating or Reactivating the Plugin Delete Its Settings?

Normally, no.

WordPress plugins usually save their settings in:

  • The wp_options database table
  • Custom database tables
  • Post metadata
  • User metadata
  • Scheduled WordPress cron events

Updating, deactivating, or replacing the plugin files generally does not remove this information.

Settings are more likely to be deleted when:

  • The plugin has an uninstall cleanup option enabled.
  • The plugin’s uninstall process removes database records.
  • The database was restored from an older backup.
  • The plugin developer changed the settings structure.
  • A database optimization tool removed plugin data.
  • The plugin directory contains custom modifications that were overwritten.

Always take a database backup before reinstalling an important plugin.

How Plugin Developers Can Prevent This Problem

Renaming the primary plugin file can cause WordPress to lose track of the active plugin path.

Plugin developers should avoid changing the main plugin file after release unless absolutely necessary.

When a file name change is required, developers should:

  • Test updates from multiple older versions.
  • Provide clear release notes.
  • Preserve backward compatibility where possible.
  • Test plugin activation after an automatic update.
  • Avoid deleting the old entry point without a migration strategy.
  • Notify users that manual reactivation may be required.

This is especially important for plugins running on WooCommerce stores, membership websites, booking platforms, and other business-critical websites.

How to Prevent Problems During Future Plugin Updates

Follow these practices before updating plugins:

Test Updates on Staging

Create a staging copy and test the update before installing it on the live site.

Verify:

  • Plugin activation
  • Front-end layout
  • Forms
  • Checkout
  • Payments
  • Login and registration
  • Scheduled tasks
  • Email delivery
  • Mobile responsiveness

Read the Changelog

Check whether the update includes:

  • File structure changes
  • Database migrations
  • PHP requirement changes
  • Removed features
  • Major rewrites
  • Breaking changes

Create a Restore Point

Take a full backup immediately before updating.

The backup should include both the website files and database.

Update One Plugin at a Time

Updating plugins individually makes it easier to identify which update caused a problem.

Monitor the Website After Updating

After each update, review:

  • Critical pages
  • PHP error logs
  • Browser console errors
  • WooCommerce checkout
  • Contact forms
  • Admin dashboard warnings

Frequently Asked Questions

Why did WordPress deactivate my plugin by itself?

WordPress may deactivate a plugin when its saved main file path no longer exists. This can happen after an incomplete update or when the plugin developer renames the primary plugin file.

How do I fix the “plugin file does not exist” error?

Update the plugin, refresh the Installed Plugins page, and activate the plugin again. If it remains unavailable, reinstall the latest version from the official source.

Will reactivating the plugin restore my previous settings?

In most cases, yes. Plugin settings are generally stored in the WordPress database and are not removed when a plugin is deactivated.

Should I rename the plugin file manually?

No. Manually renaming plugin files can create additional update and compatibility issues. Install the correct official version instead.

Can caching cause the old plugin error to remain visible?

Yes. WordPress, browser, server, object, or CDN caching can sometimes cause outdated plugin information to remain visible. Clear all cache layers and refresh the Plugins page.

Is it safe to delete and reinstall the plugin?

It may be safe when you have a complete backup and the plugin does not remove data during deletion. Renaming the existing plugin directory and uploading a clean version is usually safer than immediately deleting it.

Final Thoughts

When WordPress automatically disables a plugin after an update, the plugin may not actually be damaged. A renamed main plugin file can cause WordPress to continue looking for a file that no longer exists.

The usual solution is straightforward:

  1. Update the plugin.
  2. Refresh the Plugins page.
  3. Activate the plugin again.
  4. Confirm that its settings are still available.
  5. Test all affected website features.

For important production websites, always test plugin updates on staging and create a complete backup before making changes.

About the author

Tahrim Naziat

WordPress and Server Troubleshooting Specialist

Tahrim Naziat is a senior WordPress and JavaScript developer with more than 14 years of experience specializing in WordPress troubleshooting, WooCommerce, PHP compatibility, plugin conflicts, malware cleanup, performance optimization, Nginx, Redis, and production server issues. He documents practical solutions based on real WordPress debugging, technical investigations, and client projects.

Leave a Comment