WordPress安装出现upload your website into the public_html directory

WordPress安装完毕,打开网站首页出现了如下错误:To change this page, upload your website into the public_html directory。经过对比摸索,最后终于解决。

To change this page, upload your website into the public_html directory

因为网站WordPress安装时提示已安装成功,后台登陆一切正常,可以发设置,可以发博文。因此想想访问的首页是出现的这种错误,错误很可能出现在index.html文件上。先看看出现错误的index.html文件内容
<html>
<head>
<title>
pifu120.cn
</title>

<style>
* { font-family: verdana; font-size: 10pt; COLOR: gray; }
b { font-weight: bold; }
table { height: 50%; border: 1px solid gray;}
td { text-align: center; padding: 25;}

</style>
</head>
<body>
<center>
<br><br><br><br>
<table>
<tr><td>Welcome to the home of <b>pifu120.cn</b></td></tr>
<tr><td>To change this page, upload your website into the public_html directory</td></tr>
<tr><td><img src="logo.png"></td></tr>
<tr><td style="font-size: 8pt">Date Created: Fri Nov  1 13:04:46 2013</td></tr>
</table>
<br><br>

</center>
</body>

</html>

而正常能访问网站的index.html是这样的
<?php
/**
* 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' );

因此首页文件很可能是错误的。因此解决方法也就简单了。

解决方法


1、最简单的方法是把index.html删掉或者重命名即可,然后刷新网页,会自动生成正确的index.html文件。

2、修改错误的index.html,把正确的代码替换错误的代码即可。正确的代码如上。

 

评论

  1. 没遇到过。但是留着将来可能有用

    回复删除
  2. 今天在安装wordpress的时候遇到同样的问题,搜索了老半天才找到您的这个答案。试了以后真的有效了,非常感谢。

    回复删除

发表评论

此博客中的热门博文

EndNote为参考文献分类显示

如何选择和阅读科技论文

EndNote X8 汉化版

EndNote X8 新功能简介

推荐25个搜索下载电子书籍的好地方