跳转到主内容
趣航编程网 - 趣学编程,启航技术之路!

wordpress迁移以及遇到的一些问题[mysql备份导入导出][固定链接4

总的问题有两个,一是apache的配置,二是 mysql 的导出和导入。以及迁移后遇到的一些问题解决过程和方法。 A机器为老服务器,B为新服务器,A机器使用Appserv,B使用wmap,在配置多站点时候,遇到了一点儿不同。 除了都要打开httpd.conf Include conf/extra/htt 总的问题有两个,一是apache的配置,二是mysql的导出和导入。以及迁移后遇到的一些问题解决过程和方法。 A机器为老服务器,B为新服务器,A机器使用Appserv,B使用wmap,在配置多站点时候,遇到了一点儿不同。 除了都要打开httpd.conf Include conf/extra/httpd-vhosts.conf LoadModule rewrite_module modules/mod_rewrite.so 在httpd-vhosts.conf中配置多站点对应的目录
ServerAdmin xieecjtu@163.com DocumentRoot "C:/wamp/www/wp" ServerName B.com ServerAlias www.B.com ErrorLog "logs/dummy-host.x-error.log" CustomLog "logs/dummy-host.x-access.log" common Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all ServerAdmin xieecjtu@163.com DocumentRoot "C:/wamp/www/" ServerName www.A.com ErrorLog "logs/dummy-host2.x-error.log" CustomLog "logs/dummy-host2.x-access.log" common Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all
下面这一段是 wmap设置新加的设置
<Directory"C:/wamp/www/">OptionsIndexesFollowSymLinksAllowOverrideAllOrder allow,deny Allow from all Directory>
从A机器把网站源码搞到B机器上,很多方法,ftp A机器上用mysqldump把对应的db备份起来,通过ftp下载到B机器上。一定要设定字符集,不然导入到b机器上时候,会出错。 mysql.exe -uroot  -p****–default-character-set=utf-8   mydb   mytable  >mytable.sql b机器上执行mysql -uroot -p –default-character-set=utf8mytablemytable.sql 事先在b机器上创建好 mytable库,注意数据库编码要和原来的保持一致 使用navicat来备份还原经常会出现这个问题。很可能就是编码的原因 1,.htaccess要开放写权限,这样在自定义wp的永久链接时,wp会自动重写.htaccess。所谓删除或手动重写.htaccess就是因为没有开放它的写权限。 2,找到APACHE文件中的httpd.conf文件, 把#LoadModule rewrite_module modules/mod_rewrite.so 前的#去掉,加载rewrite模块。 3,查看APACHE文件中的httpd.conf文件是否默认设置了AllowOverRide为None,如果是,要改成All。或者修改wordpress所在的vhost段添加 AllowOverride All htaccess文件。 重启apache,一切搞定。 查看更多关于wordpress迁移

相关文章