Skip to content

Instantly share code, notes, and snippets.

@remcotolsma remcotolsma/wp-config.php
Last active Apr 7, 2016

Embed
What would you like to do?
WordPress readonly from wp-config.php
<?php
// ...
if ( is_readable( 'readonly.html' ) && ! in_array( $_SERVER['REQUEST_METHOD'], array( 'HEAD', 'GET' ) ) ) {
header( 'HTTP/1.1 503 Service Temporarily Unavailable', true, 503 );
header( 'Status: 503 Service Temporarily Unavailable', true, 503 );
header( 'Retry-After: 3600' );
include 'readonly.html';
exit;
}
// ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.