一般安装好wordpress后我们访问wordpress的url是:xxx.xxx.xxx.xxx/wordpress,前面是你的主机IP,后面是你的wordpress安装目录,那么问题来了,要怎么将我们的wordpress的url:xxx.xxx.xxx.xxx/wordpress改为xxx.xxx.xxx.xxx(直接用你的主机IP访问wordpress)?
首先,使用putty、FileZilla等工具登录你的服务器,进去你的worspress安装目录
下图就是wordpress的目录文件
然后复制(记得是复制不是剪切)index.php和.htaccess文件到你的网站根目录,就是www目录。比如说我的网站根目录是/wwwroot/
如下图
复制完后用文件编辑器打开index.php,将里面的
require( dirname( FILE ) . ‘/wp-blog-header.php’ );
修改为
require( dirname( FILE ) . ‘/wordpress/wp-blog-header.php’ );
搞定,现在打开你的浏览器到你的wordpress管理页面做如下修改,最