2014-09-01 46 views
0

我最近安裝了WP 3.9.2,來自InMotion。 我使用說明在這個URL把WordPress的文件在自己的目錄,而不是根爲我的網站:WordPress自己的目錄

http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory 

我以前使用過這一點,它的工作。

這一次,這些指令來更改index.php文件:

Change the following and save the file. Change the line that says: 

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

to the following, using your directory name for the WordPress core files: 

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

是沒有意義的,因爲沒有與「/wp-blog-header.php」文件中沒有「規定」線名稱。

唯一需要在新的index.php文件行是這些:

/** Load WordPress Bootstrap */ 

require_once(dirname(__FILE__) . '/admin.php'); 

/** Load WordPress dashboard API */ 

require_once(ABSPATH . '/wp-admin/includes/dashboard.php'); 

我嘗試添加我指定的文件夾中的wp這些,但沒有喜悅。

任何建議,將不勝感激。

謝謝!

回答

1

我認爲你看錯了index.php - 你發佈的內容適合<root>/wp-admin/index.php,或者<root>/wp-admin/network/index.php

文檔中引用的文件是<root>/index.php,其中<root>是當前WordPress安裝的最頂層文件夾。

它應該是這樣的,當你打開它:

define('WP_USE_THEMES', true); 

/** Loads the WordPress Environment and Template */ 
require('./wp-blog-header.php'); 

(我已經通過下載新的3.9.2選中),如果你不能找到正確的index.php,請嘗試通過OS的內置搜索功能搜索require('./wp-blog-header.php');

+0

你是對的。謝謝你徹底檢查一下。我按照指示*正確*並按照所述方式工作。格雷西! – wayfarer 2014-09-01 20:09:42

+0

@wayfarer沒問題 - 我們都在那裏:) – Lasse 2014-09-02 07:54:30