简体   繁体   English

我有两个网站域,即A和B。是否可以切换这些域,以使A的内容移至B,反之亦然?

[英]I have two website domains, A and B. Can I switch the domains so that A's content moves to B, and vice versa?

For context, these are both blogs running on WordPress . 就上下文而言,这两个都是在WordPress上运行的博客

They are running different themes that have each been customized. 他们运行着各自定制的不同主题

They share the same hosting account . 他们共享相同的托管帐户

If anyone is wondering how this happened, site A is my name and was the first site I started blogging on. 如果有人想知道这是怎么发生的,则站点A是我的名字,也是我开始写博客的第一个站点。 As the blog began to grow, I bought B, a much better domain name that is more SEO-friendly to my niche. 随着博客的发展,我购买了B,这是一个更好的域名,对我的利基市场更加友好。 With most of my content on site A, however, I used B only to make resource pages and to explain more about who I am and what services I can offer - a resume of sorts. 但是,由于我的大部分内容都在网站A上,所以我仅使用B来制作资源页面,并更多地说明我是谁以及可以提供哪些服务-各种简历。

It's now been rightly pointed out to me that Site B deserves to have most of the content, while Site A (my name) should be the simple site that explains what I am about. 现在已经正确地向我指出,网站B应该拥有大部分内容,而网站A(我的名字)应该是一个简单的网站,可以解释我的意思。

It's an unfortunate situation that came up from a lack of foresight. 不幸的是,由于缺乏远见。 But alas, here I am. 但是a,我在这里。

Is there any way to swap the domain names that I both own, solving the problem without resorting to a large-scale transfer of content one page at a time. 有什么办法可以交换我俩拥有的域名,从而解决问题而不必一次大量地转移内容。

If you're running WordPress software on a hosting site you can administer, you can update the config file of your web server on each website to point to the correct path. 如果您可以在托管站点上运行WordPress软件,则可以在每个网站上更新Web服务器的配置文件,以指向正确的路径。 For example, if you use Apache and your current config files are: 例如,如果您使用Apache,并且当前的配置文件为:

<VirtualHost *:80>
    ServerName www.site_a.com
    DocumentRoot "/www/site_a"
</VirtualHost>

<VirtualHost *:80>
    ServerName www.site_b.com
    DocumentRoot "/www/site_b"
</VirtualHost>

Then update it to: 然后将其更新为:

<VirtualHost *:80>
    ServerName www.site_a.com
    DocumentRoot "/www/site_b"
</VirtualHost>

<VirtualHost *:80>
    ServerName www.site_b.com
    DocumentRoot "/www/site_a"
</VirtualHost>

Alternatively, if you're hosting on WordPress site (eg site_a.wordpress.com), then your simplest option will perhaps be downloading a backup of each site, and restore them switched. 另外,如果您托管在WordPress网站(例如site_a.wordpress.com)上,则最简单的选择可能是下载每个网站的备份,然后切换恢复。

You should contact your website hosting provider and ask for help. 您应该与您的网站托管提供商联系并寻求帮助。 They can help you by swapping document root of both sites (by assuming both website hosting at same provider). 他们可以通过交换两个站点的文档根目录(假设两个站点都托管在同一提供程序中)来为您提供帮助。

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

相关问题 我可以在两个域上拥有两个完全相同的网站,理想情况下是从同一Wordpress运行吗? - Can I have two identical websites over two domains, ideally running from same Wordpress? 如何将域名重定向到主网站? (仅内容,我不想更改URL) - How to redirect domains to a main website? (content only, I do not want the url to change) 如何在Wordpress中做2个域名 - How can I do 2 Domains in wordpress 我可以跨域发布简单模式联系表单吗? - Can I make simplemodal contact form post across domains? 这两个域有什么区别? - What's the difference between these two domains? 从 mysql 数据库中获取时,如何从 a:1:{s:13:“administrator”;b:1;} 中提取管理员? - How can i extract administrator from a:1:{s:13:“administrator”;b:1;} while fetching from mysql database? 替换帖子内容中的多个域 - Replace multiple domains in post content 在我不拥有的域上安装插件时的安全性 - Safety when installing plugins on domains I don't own WordPress网站别名域之间的外观差异 - Difference in appearance between alias domains of a WordPress website 如何仅从根目录中的一个URL删除.php扩展名而又不影响子域? - How can I remove .php extension from only one URL in root directory without affecting sub-domains?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM