网站运营
联系我们
利用帝国备份王,我们可以把整个站点(包括源码和数据库)轻松的转移到新空间,然后恢复。但是wordpress从linux转到windows的服务器,还需要修改哪些地方才能使新空间运行正常呢?
1、编辑修改数据库连接文件。config.php把数据库名称和密码修改到新空间数据库。
2、linux系统转移到windows系统和linux系统修改方法是不同的。
(1)转移到linux系统,需要修改.htaccess文件的权限为777,这样wordpress才能正常的写入,执行正常。
(2)转移到windows系统,需要修改httpd.ini,因为windows使用iis,要修改互联网信息服务规则。
具体的代码为:
[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP
# Rules to ensure that normal content gets through
RewriteRule /sitemap.xml /sitemap.xml [L]
RewriteRule /favicon.ico /favicon.ico [L]
# For file-based wordpress content (i.e. theme), admin, etc.
RewriteRule /wp-(.*) /wp-$1 [L]
# For normal wordpress content, via index.php
RewriteRule ^/$ /index.php [L]
RewriteRule /(.*) /index.php/$1 [L]
另外:wordpress从linux系统转到windows系统以后,网站地图的链接会打不开,要在httpd.ini文件里从新制定网站地图的规则:
加上这两行:
RewriteRule /sitemap_baidu.xml /sitemap_baidu.xml [L]
RewriteRule /sitemap.html /sitemap.html [L]