WordPress安装出现upload your website into the public_html directory
WordPress安装完毕,打开网站首页出现了如下错误:To change this page, upload your website into the public_html directory。经过对比摸索,最后终于解决。
因为网站WordPress安装时提示已安装成功,后台登陆一切正常,可以发设置,可以发博文。因此想想访问的首页是出现的这种错误,错误很可能出现在index.html文件上。先看看出现错误的index.html文件内容
<html> <head> <title> pifu120.cn </title>而正常能访问网站的index.html是这样的<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>
<?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,把正确的代码替换错误的代码即可。正确的代码如上。

评论
发表评论