본문 바로가기

워드프레스 유지보수 모드 (Maintenance mode)

by dig it 2016. 12. 26.

briefly unavailable for scheduled maintenance. check back in a minute

예약되어 있는 유지보수를 위해 잠시 사용할 수 없습니다. 잠시 후에 다시 확인하세요

화면에 이 같은 글이 뜨면


유지보수 모드 켜고 끄기

유지보수 모드는 워드프레스 최상위 폴더에 .maintenance라는 이름으로 빈 텍스트 파일을 생성하면 활성화 된다. 유지보수 모드를 끄려면 이 파일을 지우면 된다.

유지보수 페이지 변경하기

유지보수 페이지를 좀 더 친절하게 변경하고 싶다면 wp-content/maintenance.php 파일을 만들어 해당 내용을 작성하면 된다. 기본적으로 출력되는 유지보수 페이지는 503 Service Unavailable 를 반환한다는 사실을 참고하자.

<?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' );
?>
<!DOCTYPE html>
<html lang="ko">
<head>
  <meta charset="utf-8">
  <title>Haruair.com 점검중</title>
</head>
<body>
  <h1>현재 웹사이트 점검중입니다. 잠시 후에 다시 접속해주시기 바랍니다.</h1>
</body>
</html>


댓글

최신글 전체

이미지
제목
글쓴이
등록일