Hi there,
The plugin itself is not dependant on the theme, it’s a standalone plugin which uses core WordPress function so I don’t think this has something to do with the plugin.
It would probably worth trying this with different maintenance plugins as I think the same problem will occur just because WordPress is dependant on the theme etc.
I fear that this is something I cannot control via plugin but I’m welcome to suggestions.
At the end, is it worth developing a solution for a few seconds, maybe couple of minutes while new files get’s uploaded?
Wordpress handles updates by placing a “.maintenance” file in the root which then gives you the message “briefly unavailable for maintenance” but of course that applies only for updates – not whilst copying files.
I would be more than happy if anyone has a good and simple idea of a workaround, otherwise I don’t think I can do much.
I hope that helps at least a bit.
Lukas
Maybe you can use one of these solutions?
1. The plugin can change the active theme to any temporary one with just a single empty index.php in it on a fly when enabling, and reactivate main theme when disabling maintenance. BUT it is not a good idea since many themes do a lot on ‘after_switch_theme’ hook. Unless you can bypass all main theme functions that uses this or similar hooks, grab their names – then temporary remove_action in foreach() when restoring main theme.
2. Generate a copy of maintenance page from its settings page into /wp-content/maintenance.php file (delete on plugin deactivating). The WP will use this file not only when plugin’s maintenance mode is enabled, but for its plugins and core updates too, instead of boring ‘Briefly unavailable for scheduled maintenance. Check back in a minute.’ message. One more thing you need is creat .maintenance file with <?php $upgrading = time(); ?>
in it, and delete on disabling maintenance mode. But remember to recreat .maintenance file on load if it was deleted after core or any other wp updates has finished, if ‘ljmm-enabled’ is still enabled. After creating /wp-content/maintenance.php file you will see active Drop-in on plugins page:

I prefer the 2 one, it looks more simple and fast.
Hi,
Thanks for your suggestions, I’m gonna look in to this but I cannot promise anything until I investigate further.
I can see where you getting at lookin at the code in the core.
I’m gonna “move” this over to github and mark this here as resolved but If I’ll come up with solution I’m gonna let you know but this might take a bit of time as I need to spare time for this.
My main concern is that many times there might be problems with folder permissions – e.g. cannot create a file etc. but of course that can be handled with a fallback.
Thanks again!
Lukas