Plugin Update Error
Closed this issue · 3 comments
@YahnisElsts
Hi,
I use this code
`require 'plugin-update-checker/plugin-update-checker.php';
use YahnisElsts\PluginUpdateChecker\v5\PucFactory;
$UpdateChecker = PucFactory::buildUpdateChecker(
'https://github.com/AhmadRaza9/cptpress/',
FILE,
'cptpress'
);
// $UpdateChecker->setBranch('main');
$UpdateChecker->getVcsApi()->enableReleaseAssets();`
I get plugin update but when I click on update they give me an error (update plugin fails they don't remove the plugin folder but remove my all plugins files)
I don't use plugin.json only I use the above code.
As I mentioned in the other thread, make sure that the plugin folder - and the plugin files - are not open in another application when you're trying to install an update. This could mean having a file open in a text editor or IDE, having the directory open in a console window, having a .svn
directory in the plugin folder, etc. If something is holding one of the files/directories open, WordPress may fail to delete the old plugin version, and then the whole update will fail.
Another possibility is that the folder doesn't have the correct permissions, but this problem is less common in my experience.
Thanks for your reply.
Yes, it's work. when I close my ide the WordPress update my plugin successfully
Good to hear, sounds like the issue has been resolved. I'll close it now.