Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #300242

    again a little Question to maintenance mode

    wordpress load.php got this:

    function wp_maintenance() {
    	if ( !file_exists( ABSPATH . '.maintenance' ) || defined( 'WP_INSTALLING' ) )
    		return;
    
    	global $upgrading;
    
    	include( ABSPATH . '.maintenance' );
    	// If the $upgrading timestamp is older than 10 minutes, don't die.
    	if ( ( time() - $upgrading ) >= 600 )
    		return;
    
    	if ( file_exists( WP_CONTENT_DIR . '/maintenance.php' ) ) {
    		require_once( WP_CONTENT_DIR . '/maintenance.php' );
    		die();
    	}

    so if there is a maintenance.php in the content directory this page will be shown during maintenace mode.

    Isn’t it possible to fill that maintenance.php with the content of the maintenance site we created with the theme?

    #300247

    this here is an example on an own site with static content:

    <?php
    $protocol = $_SERVER["SERVER_PROTOCOL"];
    if ( 'HTTP/1.1' != $protocol && 'HTTP/1.0' != $protocol ) $protocol = 'HTTP/1.0';
    header( "$protocol 503 Service Unavailable", true, 503 );
    header( 'Content-Type: text/html; charset=utf-8' );
    header( 'Retry-After: 600' ); // 10 minutes
    ?>
    <!DOCTYPE html>
    <html lang="de-DE" dir="ltr">
    <head>
    	<title>Sorry, wir sind bei Wartungsarbeiten</title>
    	<meta charset="utf-8" />
    </head>
    <body>
    
    <div id="content">
    	<img src="wp-content/uploads/guenni.png">
    	<h1>Wartungsarbeiten</h1>
    	<img src="wp-content/uploads/toolbox.jpg">
    	<p>Unsere Seite befindet sich vorübergehend im Wartungsmodus</p>
    	<p>Eine Tasse Kaffee weiter sind wir für Sie wieder online - Danke</p>
    </div><!-- #content -->
    
    </body>
    </html>
    <?php die(); ?>

    but i guess it might be possible to fill this with dynamic content

    you can see it here with the static content here: http://www.guenterweber.com/wp-content/maintenance.php

    #300501

    Hi!

    Thank you for using Enfold.

    I’m not sure why you need to edit the file. There are lots of maintenance plugin for wordpress such as the following:

    https://wordpress.org/plugins/wp-maintenance-mode/
    https://wordpress.org/plugins/ultimate-maintenance-mode/
    https://wordpress.org/plugins/coming-soon-maintenance-mode-ready/
    https://wordpress.org/plugins/simple-maintenance-mode/

    You can also create a page then set the template to Blank | No Header, No Footer. Set this page as Frontpage on Enfold > Theme Options temporarily.

    Cheers!
    Ismael

    #300693

    thanks ismael – i’m a lazy bone – so i don’t want to switch the maintenance mode manually.
    For the site mentioned above i made a static site called maintenance.php and put it into the wp-content folder – so when upgrading the maintenance.php is shown automatically.

    I’m not pro enough – but it might be possible to set up the maintenance site generated with the enfold options similar to the procedure above to show automatically when upgrading.

    If it isn’t possible then i have to make it via Theme Options / Frontpage Settings.

    #301212

    Hi!

    While possible its really not something we can walk you through via support. The file would need to be custom created by a freelance developer so that you can point to it as needed.

    Regards,
    Devin

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.