Actually here is an update, I now believe this is due to the value of the max_execution_time parameter in PHP . When the execution time passes that value, your server returns a fatal eror putting a stop to the process wherever you are in the script.
To put it simply this seems to be one problem that we don’t have control over. Our guess is that our increasing package size and the number of files we have in our plugin are the responsible here, but we’ve no proof of it yet.
The issue happens when WordPress is installing the plugin, this is how it happens I believe :
- WordPress deactivates the previous version of wysija
- WordPress deletes the old plugin folder
- WordPress download the new plugin
- WordPress unzip the new plugin in a temporary folder
- WordPress moves the files one by one to the destination folder plugins/wysija-newsletters
And here is the problem, during that last step at some point the script fails, and we think this maybe because the update request took too long to be processed, and that’s based on your server’s settings.
That’s the main reason I can think of :
- max_execution_time is too low
- The bandwidth on your server is not so high so it took time to download our 2.5Mb plugin
- We have too many files in our plugin and it takes time for WordPress to move them one by one to the destination folder.
Now at that stage, you find yourself with a wysija-newsletters folder which is half empty and not recognized by WordPress as a valid plugin. So when you try to install the plugin again, WordPress will tell you that the folder wysija-newsletters already exists while it won’t appear in your plugin’s listing.
So anyway for now the solution remains the same, delete the folder using FTP and install the plugin again.
Now if my theory is right, technically this problem would happen with other plugins, try for instance with this heavy plugin :
https://www.ads-software.com/extend/plugins/all-in-one-event-calendar/
Install an old version for instance that one : https://downloads.www.ads-software.com/plugin/all-in-one-event-calendar.1.8.2.zip
And then try to update it to the latest version, I guess a similar issue should happen on your server. Maybe the process will fail even earlier.
Let me know,
Ben