admin管理员组文章数量:1421377
I am running WordPress
3.3.2 with multi site
in subdomain mode.
I want to add a new subdomain
but have it be "offline" until I finish working on it. Is there an easy way to do this?
I know that if its a single site I can just add an if
in the header file and the site will be online only to me, but in this case all of my sites are using the theme, making it the same header file thus making this solution invalid.
I am running WordPress
3.3.2 with multi site
in subdomain mode.
I want to add a new subdomain
but have it be "offline" until I finish working on it. Is there an easy way to do this?
I know that if its a single site I can just add an if
in the header file and the site will be online only to me, but in this case all of my sites are using the theme, making it the same header file thus making this solution invalid.
2 Answers
Reset to default 2Your easiest route is probably to use a plugin like Restricted Site Access (disclaimer: written by my boss) to redirect a user who isn't logged in elsewhere, like the network home or something else. There are a few other similar plugins out there.
Another option would be to take the code you say you'd put in your theme and make your own little plugin with it instead. Then you can activate it for just that site. You'd need to be careful about which hook you use to check the user and then redirect.
Have you considered developing locally or on a development server and then transfering the theme/plugins/database over to your sub-site?
I would recommend it as it gives you a speed up in development time, you can test changes without worrying about affecting live users and you don't have to worry whether or not anyone can see your 'offline' site because it's literally on your own machine (or on your development server).
However, if that strategy is not viable for you or you simply don't wish to change your workflow - you could try a coming soon plugin which allows you as an admin to edit and view your site and shows a placeholder page to everyone else.
本文标签: multisiteturn single domain off
版权声明:本文标题:multisite - turn single domain off 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745342558a2654328.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论