YahnisElsts / plugin-update-checker

A custom update checker for WordPress plugins. Useful if you don't want to host your project in the official WP repository, but would still like it to support automatic updates. Despite the name, it also works with themes.
MIT License
2.22k stars 403 forks source link

Update failed: Could not remove the old plugin. #508

Closed lDemodexl closed 1 year ago

lDemodexl commented 1 year ago

When trying to update plugin it removes current version and just shows this error. In php errors found such errors: "PHP Warning: Can't to read the Version header for 'plugin main file'. The filename is incorrect or is not a plugin. "

YahnisElsts commented 1 year ago

In most cases, the error "Could not remove the old plugin" is unrelated to the update checker. It's more likely that some of the file permissions are incorrect, or that one of the files in the plugin directory was locked/inaccessible during the update. For example, if you had a file open in a code editor, or if there was an in-use .svn or .git subdirectory in the plugin directory, that might trigger an error like this.

Also, just to verify, does it literally say 'plugin main file' in the error message, or did you edit out the plugin file name?

lDemodexl commented 1 year ago

@YahnisElsts of course i changed file path in error. TY, I think I figured out where the problem came from