• 赤色のリンクは、まだ日本語Codexに存在しないページ・画像です。英語版と併せてご覧ください。(詳細

このWikiはいつでも誰でも編集できます

「WordPress を専用ディレクトリに配置する」の版間の差分

提供: WordPress Codex 日本語版
移動先: 案内検索
(17:36, 24 Jan 2007 MichaelH (Update to 2.1) の版)
 
(HelpHub 移動メッセージで置き換え。)
 
(5人の利用者による、間の20版が非表示)
1行目: 1行目:
== Giving WordPress its Own Directory While Leaving Your Blog in the Root Directory==
+
このページは https://ja.wordpress.org/support/article/giving-wordpress-its-own-directory/ に移動しました。
 
+
Many people want WordPress to power their site's root (e.g. <tt><nowiki>http://example.com</nowiki></tt>) but they don't want all of the WordPress files cluttering up their root directory.  WordPress allows you to install the WordPress files to a subdirectory, but have your blog exist in the site root.
+
 
+
The process to move WordPress into its own directory is as follows:
+
 
+
# Create the new location for the core WordPress files to be stored (we will use <tt>/wordpress</tt> in our examples).
+
# Go to the [[Administration_Panels#Options_-_Configuration_Settings|Options]] panel.
+
# In the box for '''WordPress address (URL):''' change the address to the new location of your main WordPress core files. Example: <tt><nowiki>http://example.com/wordpress</nowiki></tt>
+
# In the box for '''Blog address (URL):''' change the address to the root directory's URL. Example: <tt><nowiki>http://example.com</nowiki></tt>
+
# Click '''Update Options'''.
+
# Move your WordPress core files to the new location (WordPress address).
+
# Copy the <tt>index.php</tt> and <tt>.htaccess</tt> files from the WordPress directory into the root directory of your site (Blog address).
+
# Open your root directory's <tt>index.php</tt> file in a [[Glossary#Text editor|text editor]]
+
# Change the following and save the file. Change the line that says:<br /><tt>require('./wp-blog-header.php');</tt><br />to the following, using your directory name for the WordPress core files:<br /><tt>require('./wordpress/wp-blog-header.php');</tt>
+
# Login to the new location. It might now be <tt><nowiki>http://example.com/wordpress/wp-admin/</nowiki></tt>
+
# If you have set up [[Using Permalinks|Permalinks]], go to the [[Administration_Panels#Permalinks|Permalinks panel]] and update your Permalink structure. WordPress will automatically update your <tt>.htaccess</tt> file if it has the appropriate file permissions. If WordPress can't write to your <tt>.htaccess</tt> file, it will display the new rewrite rules to you, which you should manually copy into your <tt>.htaccess</tt> file (in the same directory as the main <tt>index.php</tt> file.)
+
 
+
[[Category:Installation]]
+
[[Category:WordPress Help]]
+
[[Category:Getting Started]]
+
[[Category:UI Link]]
+

2020年5月15日 (金) 22:55時点における最新版

このページは https://ja.wordpress.org/support/article/giving-wordpress-its-own-directory/ に移動しました。