Support

Admin Tools for WordPress

#37171 Emergency Offline Not Working

Posted in ‘Admin Tools for WordPress’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

WordPress version
5.9.3
PHP version
7.4.29
Admin Tools version
1.5.6

Latest post by tampe125 on Monday, 06 June 2022 05:52 CDT

tmichel

Please look at the bottom of this page (under Support Policy Summary) for our support policy summary, containing important information regarding our working hours and our support policy. Thank you!

I created a custom offline.html page and uploaded it to the web root directory, public_html. I then went to Admin Tools control panel and clicked emergency offline I then clicked Set Offline and was presented the message that the site was now in Emergency Offline mode., but nothing happened.

I will try again, after I get a response from you. Probably has something to do with the host the client chose for this website. I want to move him to rochen.com, they still maintain their own servers.

Oh, by the way I created a directory called offline-assets in the root folder and in it there is a css, images and fonts folder. In the fonts folder are .woff and .woff2 files. How to I add those file types to the file types allowed in Emergency Mode? Yes I know this is emergency mode, but I still want to look good in emergency mode just like I want to look good in live mode. Are font files exploitable?

tampe125
Akeeba Staff

Hello,

please note that when you create it, your IP is excluded from the Offline behavior, so you can continue working.

If you want a preview of what your visitors will see, please comment the line containing your IP. In the same way, if you want to to add woff and woff2 files, edit the .htaccess file and add those two extensions to the list, so it will become something like this:

RewriteCond %{REQUEST_URI} !(\.png|\.jpg|\.gif|\.jpeg|\.bmp|\.swf|\.css|\.js|\.woff|\.woff2)$

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

tmichel

Hi Davide, sorry it's been so long since I asked the question, but I have too many projects demanding too much of my time, so I get back to things when I can.

I cannot find where my IP is whitelisted in order to unlist it.

I can't find in .htaccess where the line "RewriteCond %{REQUEST_URI} !(\.png|\.jpg|\.gif|\.jpeg|\.bmp|\.swf|\.css|\.js|)$" is located. A search for "RewriteCond %{REQUEST_URI}" does not locate that line in .htaccess; so that line does not exist.

 

tmichel

Oh, found it, it is when I put the site in emergency offline mode that the new .htaccess file is created and then I edit that file and then view the site and see the Site Offline Page. https://gvcporphans.org/offline.html

Thanks problem resolved.

Now to create a gazillion exceptions when I enable Site protection

How do I add these changes to the file that generates this replacement .htaccess file????? So I don't have to edit the .htaccess file every time the site goes offline for any reason.

 

tampe125
Akeeba Staff

I'm sorry but that's not possible. The feature you're currently using should be enabled only when things go really wrong, it's just a step before fully blocking access using your hosting cPanel.

The offline page should be very minimal, using inline CSS and default fonts, nothing fancy. If you want some access to frontend or your site still be minimal functional, you should use Joomla Offline mode.

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

tmichel

Well, nothing is impossible, so I will take that to mean more difficult than you care to explain. There is no plugin override in WP like there is in Joomla, so I can't just copy the .php file to the templates/my-template/html folder and modify it like I can in Joomla. So I will take this to mean it is more of a bother than it is worth in WP. No big deal to add the .woff and .woff2 exceptions to the .htaccess file.

I like https://gvcporphans.org/offline.html. There is only html, css and jpeg images, and nothing else, so I don't see what can be exploited here unless the browsers have some kind of vulnerability where css is concerned or that jpeg images present some kind of vulnerability. With this offline.html file I can leave the site offline, in the case that the site is hacked, for however much time it takes to get it fixed, knowing full well, that there is at least some kind of page that potential supporters can see that will give them some information about what the organization does and contact information. If I am wrong about that and this does present a vulnerability then I will accept standing corrected if that is the case.

tmichel

I wanted to say, now that I have everything set up, that Akeeba Admin Tools is a supper product and no WordPress site should be without it. No Joomla website should be without it either.

That to all of you and especially to Nicholas for developing it.

Thank you Davide for responding to my questions.

tampe125
Akeeba Staff

Thank you for your kind words!

Sadly WordPress is lacking several features that in Joomla are taken for granted. Doing modifications to the Emergency Offline button would add a lot of complexity, since you'll end up with a clone of the Htaccess Maker.

I think the fastest and easiest solution is to manually add those lines when you have to hit the Emergency button (hopefully very few times!)

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!