2014-09-01 43 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