Install wordpress on subdomains

时间:2018-02-01 18:30:28

标签: wordpress subdomain

I need some help with wordpress. I have got a wordpress on my main domain and I would like to use another wordpress on my subdomains with the same theme, plugins, blog pages and posts but different links in my blog posts. I want to know how I can change the links in my blog posts for the main domain and the subdomains?

Do I need to create a subdirectory folder and a different database name for each subdomain and do I also need to copy the wordpress files from the main domain to the subddirectories folder so I could be able to create the username and password for the subdomains and then login in the wordpress for each subdomain to change the links in the blog posts?

I want you to understand that I want to use the main domain and subdomains to use the same theme, same plugins, same blog posts and same pages but the links in the blog posts have to be different, because I am going to use different traffic sources on each subdomain to track for clicks and sales, example: my main domain will be use for google traffic, the blog subdomain is for facebook and the other subdomain is for easyhits4u. I can track the clicks and sales for google and other traffic sources because the links in the blog posts for the main domain and subdomains would not be the same.

If I use the same links in the blog posts for the main domain and the subdomains, I would not know how many clicks and sales I would get from each traffic source I use and I would not know where the clicks and sales are coming from. That is why I want to use it seperate so I can track it easy.

1 个答案:

答案 0 :(得分:1)

进一步了解@Sysix的评论:

据我所知,Wordpress Multisite允许您拥有一个容纳您所有网站的文件夹。您的网站网址可以是子网域或子文件夹(但这个网站不需要真正的子文件夹,它只是关于网址)

  • subdomain.example.com
  • example.com/subdomain

在我上一次工作中,php开发者制作了一个插件或其他东西,允许你为网络的每个网站提供不同的网址。

  • example.com
  • example2.com

(如果你对此感兴趣,我会搜索一些关于它的信息)

网站仅使用数据库处理,如果您在网络中创建新网站后查看wordpress数据库,您将获得新表 wp_posts,wp_meta等,其后跟一个与网站ID 相关的数字。

所以我认为最好的方法是创建一个网站,创建所有帖子,页面,完成后,将其复制到网络中的新网站。

您可以使用以下链接中的插件复制网络网站。

https://fr.wordpress.org/plugins/multisite-clone-duplicator/

只是一个警告:我知道这种方式可行,但我也知道有一些条件可以让它运作得很好。我不清楚为什么,但我似乎记得你不能轻易复制网络的主要网站。有一种解决方法可以做到,但我不记得到底是什么问题,以及如何解决它。

我现在要搜索和测试一些东西,所以这个答案不是确定的,但它可以让你在路上。如果我发现或记住一些重要的事情,我会编辑它。

很抱歉这个答案不是真正的答案,但在评论中说不可能写下这一切......另外如果我说废话,请纠正我,我也会编辑帖子。