Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPBカップ
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

WordPressで中小企業向けイントラネットを作る方法(簡単編)

編集メモ: WPBeginner のパートナーリンクから手数料を得ています。手数料は編集者の意見や評価に影響を与えません。編集プロセスについて詳しく知る。

WordPressでイントラネットを作りませんか?WordPressは、柔軟なオプションを豊富に備えた強力なプラットフォームであり、イントラネットとして使用するのに理想的です。この投稿では、WordPressでイントラネットを作成する方法をご紹介します。

Creating a WordPress intranet for your organization

イントラネット、エクストラネットとは?なぜWordPressをイントラネットプラットフォームとして使うのか?

イントラネットまたはエクストラネットは、コミュニケーション、ファイル共有、アナウンスメント、その他の組織活動のために組織で使用されるコミュニケーションプラットフォームです。

WordPressは、組織のイントラネットやエクストラネットを構築するための優れたプラットフォームです。WordPressはメンテナンスが簡単で、オープンソースであり、何千ものWordPressプラグインにアクセスでき、必要に応じて新しい機能を追加することができます。

イントラネットは、組織のプライベートネットワーク上で動作します。通常、オフィスのITシステムは、ケーブルまたはワイヤレスネットワークアダプターを介して接続されています。ネットワーク上の1台のコンピューターをWebサーバーとして使用し、WordPressサイトをホスティングすることができます。

WAMPを使用してWindowsネットワークにWordPressをインストールする方法、またはMAMPを使用してMacコンピューターにWordPressをインストールする方法については、WordPressイントラネットを開始するためのガイドの指示に従ってください。

一方、エクストラネットとは、より大きなサイトネットワークや公共のインターネットからアクセスできるイントラネットプラットフォームのことです。わかりやすく言えば、一般にアクセス可能だが、投稿者ユーザーだけに制限されたサイトです。

組織が地理的に異なる場所に分散している場合に特に有効です。

WordPressエクストラネットを作成するには、WordPressホスティングサービスアカウントとドメイン名が必要です。その後、WordPressをインストールし、組織のイントラネットとして使用するように設定します。

WordPressをイントラネットとしてインストールしたら、次のステップはWordPressを組織のコミュニケーションハブに変えることです。

そのためには、いくつかのWordPressプラグインを使用することになります。WordPressイントラネットを成長させ、組織の目標を達成するための基盤となる基本的なセットアップをご紹介します。

BuddyPressをWordPressイントラネットのハブとして設定する

BuddyPressはWordPressの姉妹プロジェクトです。WordPressサイトをソーシャルネットワークに変換します。BuddyPressを利用したイントラネットでできることは以下の通りです:

  • ユーザーをイントラネットに招待することができます。
  • ユーザーは拡張ユーザープロフィールを作成することができます。
  • 有効化したアクティビティストリームにより、ユーザーはTwitterやFacebookのように更新をフォローすることができます。
  • ユーザーグループを作成し、ユーザーを部署やチームに分けることができます。
  • ユーザー同士を友達としてフォローすることができます。
  • ユーザー同士でプライベートメッセージを送ることができます。
  • サードパーティのプラグインを追加することで、新しい機能を追加できます。
  • BuddyPress用のWordPressテーマで豊富なデザインオプションがあります。

BuddyPressを始めるには、まずBuddyPressプラグインをインストールし、有効化する必要があります。詳しくは、WordPressプラグインのインストール方法をご覧ください。

有効化したら、設定 ” BuddyPressのページでプラグインの設定を行います。

BuddyPress settings

BuddyPressでWordPressをソーシャルネットワークにする方法をご覧ください。

オールインワン・イントラネットでWordPressイントラネットを保護する

ローカルサーバーでWordPressイントラネットを運用している場合、.htaccessファイルで内部IPへのアクセスを制限することでセキュリティを確保できます。

しかし、エクストラネットを運営している場合、ユーザーが異なるサイトネットワークやIPアドレスからイントラネットにアクセスする可能性があります。

本当に〜してもよいですか?投稿者だけがあなたの会社のイントラネットにアクセスできるようにするには、あなたのエクストラネットをプライベートにし、登録されたユーザーだけがアクセスできるようにする必要があります。

そのためには、All-in-One Intranetプラグインをインストールして有効化する必要があります。詳しくは、WordPressプラグインのインストール方法のステップバイステップガイドをご覧ください。

有効化したら、Settings ” All-in-One Intranetのページでプラグインの設定を行います。

All in One Intranet settings

まず、”Force site to be entirely private “オプションの隣にあるボックスをチェックする必要があります。これでWordPressサイトのすべてのページが完全に非公開になります。

このプラグインがプライベートにしないのは、アップロードディレクトリのファイルだけです。ご心配なく、この投稿の後半で保護する方法をご紹介します。

次に、ユーザーがログイン中にリダイレクトさせたいURLを指定する必要があります。これはイントラネット上のどのページでもかまいません。

最後に、アクティブでないユーザーを一定時間後に自動的にログアウトさせることができます。

変更を保存するボタンをクリックして、設定を保存することを忘れないでください。

WordPressイントラネットでのメディアアップローダーの保護

サイトを完全に非公開にしても、メディアファイルには影響しません。誰かがファイルの正確なURLを知っていれば、何の制限もなくアクセスできます。

それを変えましょう。

より良い保護のために、アップロード・フォルダーへのリクエストをすべてシンプルなPHPスクリプトにリダイレクトします。

このPHPスクリプトは、ユーザーがログイン中かどうかをチェックします。もしログインしていれば、ファイルを提供します。そうでない場合、ユーザーはログインページにリダイレクトされます。

まず、メモ帳のようなプレーンテキストエディターを使って、コンピューター上に新規ファイルを作成する必要があります。その後、以下のコードをコピー&ペーストし、download-file.phpとしてデスクトップに保存してください。

[cbk1]

FTPクライアントを使用してサイトに接続します。接続したら、作成したファイルをサイトの/wp-contents/uploads/フォルダにアップロードします。

次に、サイトのルートフォルダーにある.htaccessファイルを編集する必要があります。.htaccessファイルの一番下に以下のコードを追加してください:

[cbk2]

変更を保存し、ファイルをサイトにアップロードすることを忘れないでください。

これで、あなたのメディアフォルダーへのユーザーリクエストはすべてプロキシスクリプトに送られ、認証チェックとログインページへのリダイレクトが行われるようになります。

4.WPFormsでWordPressイントラネットにフォームを追加する

WPForms

イントラネットの主な目的はコミュニケーションです。BuddyPressは、アクティビティストリーム、コメント、プライベートメッセージの機能を備えています。

しかし、時には投票やアンケートで個人的に情報を収集する必要があります。また、その情報をソートして保存し、後で使用する必要があります。

そこでWPFormsの出番です。これは市場で最高のWordPressフォームビルダーです。

美しいフォームを簡単に作成する権限があるだけでなく、ユーザーのレスポンスをデータベースに保存することもできます。どのフォームのレスポンシブもCSVファイルにエクスポートすることができます。

これにより、フォームの回答をスプレッドシートに整理したり、印刷したり、同僚と共有したりすることができます。

WordPress イントラネットの拡張

ここまでで、あなたの組織には完璧に機能するイントラネットが完成しているはずです。しかし、プラットフォームをテストしたりユーザーに公開したりするうちに、新しい機能を追加したり、よりセキュアにしたりしたくなるかもしれません。

WordPressのプラグインには、それを手助けしてくれるものがたくさんあります。ここでは、すぐにでも追加したいツールをいくつかご紹介します。

これですべてです。

この投稿が、あなたの組織のWordPressイントラネット作成のお役に立てば幸いです。中小企業に最適な給与計算ソフトの比較もご覧ください。

この投稿が気に入ったなら、WordPressの動画チュートリアルをYouTubeチャンネルに登録してください。Twitterや Facebookでもご覧いただけます。

情報開示 私たちのコンテンツは読者支援型です。これは、あなたが私たちのリンクの一部をクリックした場合、私たちはコミッションを得ることができることを意味します。 WPBeginnerの資金源 をご覧ください。3$編集プロセスをご覧ください。

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

究極のWordPressツールキット

ツールキットへの無料アクセス - すべてのプロフェッショナルが持つべきWordPress関連製品とリソースのコレクション!

Reader Interactions

22件のコメント返信を残す

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. John Akpama says

    The article is very helpful. Quick question please, for an intranet, how do other computers on my internal network access the wordpress intranet? If there is a previous article on this please share the link let me go through it. TIA

    • WPBeginner Support says

      It would depend on how your intranet is set up as each intranet can have its own tools for customizing what URL goes where. If the tool you are using for your network has documentation we would recommend checking that and there should be the option to set where a specific URL directs to.

      管理者

  3. Megan says

    How would you update WP if you do not have access to the internet? Does it have to be done manually through FTP?

  4. AdamGreenberg says

    I’m a US Peace Corps volunteer in Zambia considering the possibilities of doing this in the rural village where I live. Starting with the two schools who have a few, older computers. There’s no internet here, so this could be fantastic for sharing offline learning like Khan Academy Lite and such. I understand the localhost WordPress component of this, but how do I start by even connecting two computers in a LAN? Is it with cat 5 cables or can it even be done with wireless routers? Thank you. I think an Intranet could be a huge help here.

    • WPBeginner Support says

      That question is a bit beyond this article, it would depend on what tools you have available but normally one computer would need to be the web server while the other computers need the ability to connect to that computer

      管理者

  5. Ken says

    I tried to implement the Securing Media Uploads script and configured in .htaccess but when I tried to copy the exact image link and access it in a browser that does not have the intranet session it can still access! Did I missed some PHP modules?

  6. Michael says

    I have been using the method described in this article to protect my media for a couple of days now when all of a sudden it stopped working – not sure if sue to a change in server configuration or something else. Media wouldn’t show up for registered users, when diretly requesting a file being logged in a 404 error would appear.

    Solved it by changing two things:

    .htaccess:
    RewriteCond %{REQUEST_FILENAME} -s
    RewriteRule ^wp-content/uploads/(.*)$ wp-content/uploads/download-file.php?file=$1 [QSA,L]

    download-file:
    <?php

    $parse_uri = explode( 'wp-content', $_SERVER['SCRIPT_FILENAME'] );
    require_once( $parse_uri[0] . 'wp-load.php' );

    is_user_logged_in() || auth_redirect();

    Just in case someone has the same problem…

  7. Sean says

    This post was just what I was looking for, so thank you for posting it!
    However, something isn’t right.
    I may be brand spanking new to this whole thing but either the adding of the script for securing media files and/or the 2 lines added to the .htaccess file prevents images from being displayed in the Media Library.
    I’m thinking it’s a permission issue of some type but I’m not really sure how to proceed.

    • Sean says

      Looks like it’s the .htaccess file (2 lines of code) that is causing the images to not load in the Media Library. I put the old one back and the images load. Any advice would be appreciated.

      • Michael says

        Sean, I am having the same problem here. I did a small workaround in the .htaccess:

        RewriteCond %{REMOTE_ADDR} !123.456.789.000
        RewriteCond %{REQUEST_FILENAME} -s
        RewriteRule ^wp-content/uploads/(.*)$ download-file.php?file=$1 [QSA,L]

        The first line makes an exception for my home IP, I might be adding office IPs too. Seems to work quite well.

  8. Jonathon says

    Your code for restricting the uploads folder doesn’t seem to be working anymore or I might have a plugin conflict.

  9. LFreitas says

    Hi, thanks for the article!

    I’m planning to use WP in a extranet and this will be very helpful.

    To meet the requirements I also need an unique calendar for the staff.

    It should allow schedule meetings with multiple people and these people should receive an email with the invitation; also this email should contain metadata that added the event to outlook calendar, as it is used to remind people of the meeting. (Everyone uses Outlook as email here).

    Do you guys know any plugin or method to do this?
    I’ve tried several calendar and booking plugins, but none meets this requirement. Specially because it is possible to have multiple meetings at the same time, with different people.

    Thanks in advance!

返信を残す

コメントありがとうございます。すべてのコメントは私たちのコメントポリシーに従ってモデレートされ、あなたのメールアドレスが公開されることはありませんのでご留意ください。名前欄にキーワードを使用しないでください。個人的で有意義な会話をしましょう。