3
2

More than 1 year has passed since last update.

WordpressをAzure上に作る方法

Last updated at Posted at 2020-03-10

Wordpressをインストールする

image.png

Azure上でWordPressのサイトを作る方法

AppServiceとデータベースを設定する

image.png

image.png

データベースの価格レベルを「Basic」に設定する。
※現在のところ、MySQLの価格レベルは後で変更できないので要注意!

image.png

image.png

image.png

アクセスするURL

image.png

FTP資格情報

image.png

アプリケーションの資格情報でログインする

image.png

Azureから直接ファイルを編集する方法

app>開発ツール>AppServiceEditor
image.png

image.png

AppServiceにIPアドレス制限をかける方法

ホーム>App Service>AppName | ネットワーク

image.png

デフォルトの状態から許可するIPを追加するとこのようになる
image.png

初回のアクセスが遅い

image.png

参考:
https://blog.shibayan.jp/entry/20200113/1578920798

Microsoftアカウント認証を設定する

★アプリの登録を行う

※アプリケーションの登録画面から行うと上手くいかないので、AppServiceの認証設定から新規で作成した方が上手くいく

image.png

image.png
image.png

入力例.
https://contoso.azurewebsites.net/.auth/login/aad/callback

アプリケーションクライアントIDをコピーする

image.png

image.png
※とりあえず「有効期限なし」に設定

image.png

Certificates & secrets ページに表示される値をコピーします。 この値はページから移動すると再び表示されません。

参考:
https://docs.microsoft.com/ja-jp/azure/app-service/configure-authentication-provider-microsoft

AppServiceの認証を設定する

ホーム>appname | 認証/承認

image.png

image.png

メールサーバーの設定

Azureではメールサーバーを用意することは推奨されておらず、SendGridを利用します。

image.png

WordPress に WP Mail SMTP by WPForms プラグインをインストールし、設定からSendGrid を選択します。 Crate API key から APIキーを発行できるので貼り付けるだけです。

image.png

APIの発行方法

〇Azure-[SendGridAccount]-[アカウント名]-[Manage]
image.png

※最初はメール認証などがあります

〇Setting-ApiKeys-CreateAPIKey

image.png

image.png

出来上がったApiKeyをWordpressのプラグインWP Mail SMTPに貼り付ける

image.png

こちらを参照
https://tech-lab.sios.jp/archives/11190

SendGridエラー

The from address does not match a verified Sender Identity. Mail cannot be sent until this error is resolved. Visit https://sendgrid.com/docs/for-developers/sending-email/sender-identity/ to see the Sender Identity requirements - from;

差出人アドレスが検証済みの送信者IDと一致しません。 このエラーが解決されるまで、メールを送信することはできません。 httpsにアクセス:

⇒APIKeyを再発行して設定のやり直しを実施

phpMyAdminの利用方法

Azure上からphpMyAdminにアクセスできます。

AppServive>App名>設定>MySQLinApp>管理

image.png

image.png

image.png

localdb内にwordpressのデータは存在している

image.png

MySQLからプラグインを一時的に無効にする方法

FTPでAppServiceに接続する方法

image.png

価格プラン変更

image.png

SSL証明書

image.png

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2