Skip to main content

Wordpress Toolkit - remove footer from maintenance mode

Comments

12 comments

  • cPRex Jurassic Moderator
    Hey there! I've reached out to the WordPress Toolkit team and I'll post an update once I've heard back.
    0
  • cPRex Jurassic Moderator
    On cPanel systems, there is a template file at /usr/local/cpanel/3rdparty/wp-toolkit/var/maintenance that you can customize to modify the layout of that maintenance mode template. I hope that helps!
    0
  • WorkinOnIt
    On cPanel systems, there is a template file at /usr/local/cpanel/3rdparty/wp-toolkit/var/maintenance that you can customize to modify the layout of that maintenance mode template. I hope that helps!

    Does that get overwritten when they update the toolkit ?
    0
  • cPRex Jurassic Moderator
    @WorkinOnIt - no, those changes will stick!
    0
  • WorkinOnIt

    Hey cPRex

    I made the changes in the /usr/local/cpanel/3rdparty/wp-toolkit/var/maintenance/template.phtml file and reloaded a site that was in maintenance mode, but the old template still shows.

    I'm guessing I need to clear a cache somewhere or force a restart of wptoolkit, but could you clarify what the best way to achieve that would be?  

    https://docs.cpanel.net/knowledge-base/cpanel-developed-plugins/wp-toolkit-command-line-interface/

    0
  • cPRex Jurassic Moderator

    I'll do some testing with this a bit on Monday, but I may need to poke the team as it's been a bit so things may have changed.  I'll let you know more as soon as I do!

    0
  • cPRex Jurassic Moderator

    So it seems things have changed a bit since this thread was originally created.  We now have an interface option that controls that template file you can use, and that will make the changes happen immediately on the domain.  If you click the configuration toggle on the bottom right next to the "Maintenance Mode" button you'll see all the options available that are controlled by the template.  I've attached a screenshot showing this.

     

    When using the interface the changes are reflected immediately on the website, so it sounds like we would prefer people not edit the template files directly at this point. 

    0
  • WorkinOnIt

    Thanks.  While that's helpful for a single site, I need to be able to make the change server wide.  I guess /usr/local/cpanel/3rdparty/wp-toolkit/var/maintenance/template.phtml file  is the way to do it for now.

     

     

    0
  • cPRex Jurassic Moderator

    Ah.  I'll poke the WP Toolkit team and see if there is a better option available!

    0
  • cPRex Jurassic Moderator

    Apparently there isn't an easy option to get this working.  Your best option is to use the WP Toolkit Rest API.  Details on that can be found in WP Toolkit, Settings, Open REST API documentation.

    You'll want to use the tool to get a list of all installations:


    and then create a for loop to execute this command against all of them:

    DELETE /v1/installations/{installationId}/features/maintenance/template

    That will force each installation to use the default template instead of any local version that may be in place.

    0
  • WorkinOnIt

    Can you ask them if there a way to specify our own child template on the server? e.g. 

    /usr/local/cpanel/3rdparty/wp-toolkit/var/maintenance/template_custom.phtml

    I assume the template.phtml will get overwritten when there is an update?

     

     

     

    0
  • cPRex Jurassic Moderator

    I've been told the main template.phtml does *not* get overwritten :D

    0

Please sign in to leave a comment.