Skip to content

Instantly share code, notes, and snippets.

@RyoSugimoto
Last active April 19, 2017 05:22
Show Gist options
  • Save RyoSugimoto/3ab6716f75b03516be3ab03cda19242f to your computer and use it in GitHub Desktop.
Save RyoSugimoto/3ab6716f75b03516be3ab03cda19242f to your computer and use it in GitHub Desktop.
サブディレクトリで構築したWordPressサイトを、ドメインのルートに設定する。

1. 管理画面の設定項目から、「サイトアドレス(URL)」をルートURLに設定する。

2. index.php の内容を書き換える。

require( dirname( __FILE__ ) . '/wp-blog-header.php' );

上の部分を下記のように書き換える。

require( dirname( __FILE__ ) . '/wp/wp-blog-header.php' );

3. index.php.htsccess をルートディレクトリに移動する

4. パーマリンクの再設定

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment