简体   繁体   English

子域上的WordPress开发站点进入错误域

[英]WordPress development site on sub-domain going to wrong domain

I am trying to set up a development site on the sub-domain development.warriorsliveon.org of warriorsliveon.org. 我正在尝试在warriorsliveon.org的子域development.warriorsliveon.org上建立一个开发站点。

This is a WordPress site and I copied the plug-ins, themes, and upload folders to the new WordPress installation on the sub-domain. 这是一个WordPress网站,我将插件,主题和上传文件夹复制到了该子域上的新WordPress安装中。 I also copied the database from warriorsliveon.org, did a find and replace of warriorsliveon.org to development.warriorsliveon.org. 我还从warriorsliveon.org复制了数据库,找到了warriorsliveon.org并将其替换为development.warriorsliveon.org。

When I go to the site , http://development.warriorsliveon.org . 当我访问该站点时,请访问http://development.warriorsliveon.org it either switches automatically to the follow address, or other times, lets me log into WordPress, but then goes to this address. 它要么自动切换到跟随地址,要么其他时间让我登录WordPress,然后转到该地址。

http://development.development.www.development.development.warriorsliveon.org/ http://development.development.www.development.development.warriorsliveon.org/

Anyone have any ideas where I should look to resolve this issue? 有人对我应该解决这个问题有什么想法吗?

I'm happy to post any code, just not sure at this point what would be useful. 我很高兴发布任何代码,只是不确定在这一点上什么有用。 Any help is appreciated! 任何帮助表示赞赏!

Changing the Domain Name that your Wordpress installation runs under is more complicated than just editing one or two files. 更改您的Wordpress安装所运行的域名比仅编辑一个或两个文件要复杂得多。 The best approach is to use a tool like https://interconnectit.com/products/search-and-replace-for-wordpress-databases/ 最好的方法是使用https://interconnectit.com/products/search-and-replace-for-wordpress-databases/之类的工具

If you download this free tool and upload to your server then it does a batch find-and-replace across every single table in your Wordpress database. 如果下载此免费工具并上传到服务器,则它将在Wordpress数据库中的每个表中进行批量查找和替换。

So, for example, replace http://www.warriorsliveon.org with http://development.warriorsliveon.org 因此,例如,将http://www.warriorsliveon.org替换为http://development.warriorsliveon.org

You can do a dry run and it will show you all the replaces that it will make. 您可以进行空运行,它会向您显示它将进行的所有替换。 Once you're happy then click the "live run" button and all the changes are made. 感到高兴后,请单击“实时运行”按钮,然后进行所有更改。

I use this tool all the time when I am moving a site from my local machine to the live server. 当我将站点从本地计算机移至实时服务器时,我一直都在使用此工具。 I also use the exact same approach when migrating a site from http to https 从http迁移到https时,我也使用完全相同的方法

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM