最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How can I use different domains on a WP multisite install?

programmeradmin5浏览0评论

I want to offer my clients WordPress websites, but want to use WP multisite. I've read multiple articles on using a plugin, not using a plugin, etc.

My clients own their own domain names and want me to host/manage their sites. So I'll be using my main website as the install abc.

When you visit one of their sites like client1 or client2, I don't want the domain name to be a subsite client1.abc. I need them to stay on client1 or client2.

I did find a lot of tutorials, but most are with a plugin and some are reporting buggy behavior.

I've tried messing with the DNS as well, but the site still isn't redirecting. So I guess I'm just looking for the best way to do this.

Any and all help is appreciated.

I want to offer my clients WordPress websites, but want to use WP multisite. I've read multiple articles on using a plugin, not using a plugin, etc.

My clients own their own domain names and want me to host/manage their sites. So I'll be using my main website as the install abc.

When you visit one of their sites like client1 or client2, I don't want the domain name to be a subsite client1.abc. I need them to stay on client1 or client2.

I did find a lot of tutorials, but most are with a plugin and some are reporting buggy behavior.

I've tried messing with the DNS as well, but the site still isn't redirecting. So I guess I'm just looking for the best way to do this.

Any and all help is appreciated.

Share Improve this question asked Mar 14, 2017 at 19:34 lz430lz430 1232 silver badges17 bronze badges 1
  • see the answer to this other question. It should provide you with all you need to know. – Paul 'Sparrow Hawk' Biron Commented Mar 14, 2017 at 19:44
Add a comment  | 

2 Answers 2

Reset to default 1

To keep your options open with an open architecture you can create a multisite Network installation with multiple Networks. This means for each separate client you would give them a new Network. The advantage of this is that you can offer the scalability to Clients and keep your options open. Clients can easily have more sites (sub-domains) added to their Network.

structure would be

Network1 > abc (main site for the whole Wordpress Multi-Network install)
Network2 > client1
Network3 > client2
Network4 > client3
Network4 > client3/shop

this shows,

  • Client1&2 have only one main site.
  • Client3 has a main site "client3" and also one "client3/shop" subsite/sub-domain.

To make all this happen you need to install the plugin wp-multi-network. Follow the install guidance for setup within wp-config.php for the plugin and also add this to your wp-config.php file..

define( 'WP_HOME',    '//' . $_SERVER['HTTP_HOST'] );
define( 'WP_SITEURL', '//' . $_SERVER['HTTP_HOST'] );

Be sure when you create your Wordpress Multi Network installation select "subfolder" install and not "subdomain" installation (refer to the codex codex.wordpress/Create_A_Network) and configure your sites for wordpress pretty permalinks (ref codex.wordpress/Using_Permalinks)

To do this, set the sites URL option to client1 and it will handle traffic for client1. It's as simple as that. You can do this by editing the site in the network admin. No additional configuration changes should be necessary, and it doesn't matter if you chose a subdirectory or a subdomain install.

Don't forget to update your host/server/DNS. Just because WordPress knows to handle traffic for that domain, doesn't mean requests to that domain will be routed to WordPress.

发布评论

评论列表(0)

  1. 暂无评论