Medrik의 Graphic Design Cabinet
워드프레스 공사중 페이지 닫기
소솜다솜
2020. 7. 14. 10:56
워드프레스의 메인페이지를 수정하거나, 레이아웃을 수정하고자 하는데, 해당 워드프레스가 root 상에 설치되어
있을경우, index.html 페이지를 만들어버리면 메인페이지를 확인 할 수 없다.
그래서, 내 ip를 체크해서 메인페이지를 확인할 수 있게 하는 방법
index.php 를 수정해준다.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
<?php
if($_SERVER[REMOTE_ADDR]=='000.000.000.000'{
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/
/**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
define('WP_USE_THEMES', true);
/** Loads the WordPress Environment and Template */
require( dirname( __FILE__ ) . '/wp-blog-header.php' );
}else{?>
Under Construction
<?}
|
cs |