在我的职业生涯中,我已经将50多个网站从Live server迁移到了Localhost,但到目前为止还没有遇到过这个问题。我使用多功能WP迁移从live server导出数据。我在导出过程中替换了url。
http://www.example.com/ to http://localhost/example/
我在本地主机的新wordpress安装中导入了数据。一切都很顺利。我的主页加载也很好。但是当我单击主页徽标时,它应该重定向到http://localhost/example/但重定向到http://localhost/dashboardXAMPP的。单击菜单项时->;应重定向到的服务http://localhost/example/services但重定向到http://localhost/services.我尝试将网站地址Url和Wordpress地址Url更改为http://localhost/example/.
我的htaccess文件。
# BEGIN WordPress
# The directives (lines) between "BEGIN WordPress" and "END WordPress" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /example/
RewriteRule ^index\\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /example/index.php [L]
</IfModule>
# END WordPress
非常感谢您的帮助。