admin管理员组文章数量:1419640
So when I go on localhost, my development environment loads fine. But when I try to go to /wp-admin
, I get redirected to the production URL mysite/wp-admin
. Where is this being set? I don't want to be redirected.
So when I go on localhost, my development environment loads fine. But when I try to go to /wp-admin
, I get redirected to the production URL mysite/wp-admin
. Where is this being set? I don't want to be redirected.
4 Answers
Reset to default 3You can find and replace instances of the old URL in your database but it's best to use a tool that handles serialized data such as BackupBuddy to avoid breaking things like some plugins. Hope this helps!
Use find and replace to find instances of your old URL and update to your new URL.
Here is a decent article on it.
http://codex.wordpress/Moving_WordPress
I wrote a little script that will create the necessary SQL code to put in phpmyadmin's SQL box (please backup DB first though)
http://tools.morningstarmediagroup/find-replace/
Note:
You'll just want to search for the top-level domain like so: http://example
and replace with http://new.example
- not a good idea to involve any trailing slash.
You can accomplish this by using WP CLI. Just run
wp search-replace old-domain new domain
Too bad WP doesnt provide in-built configs for production and local envs like PHP frameworks.
You'll have to change siteurl
and home
in wp_options
to the production site URL
本文标签: localhostwpadmin on my local redirects to production site39s wpadmin
版权声明:本文标题:localhostwp-admin on my local redirects to production site's wp-admin 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745316184a2653165.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
siteurl
and one calledhome
and a few more to specific paths. Which one do I change? – bigpotato Commented Jun 20, 2013 at 21:27