wordpressのドメイン変更

はじめに

「副業でブログ初めてみるかー」と軽い気持ちで始めてしまったため、ドメインも一番安い「.xyz」を1円で購入したのはいいものの、1年後の更新は「.com」の方が安いのね・・・🤗

SEO的にも「.com」がツヨインダヨー😐
という声もチラチラ聞こえてきたので、せっかくだからドメイン変更しちゃおうということで、ドメイン変更の手順をノートに残しておく

僕のノートが記述量足りなくてよく分からないなら、目次だけみて「あー、こんな事するんだ」くらいに見てもらって、やることリストに使っていただければと思います。

目次

1.ドメインの取得
2.DNSレコードの設定
3.wordpressの設定
4.SSLの設定
5.ドメインを登録している外部サイトを変更していく

1.ドメインの取得

お名前.comで新規ドメインを取得する

2.DNSレコードの設定

1.左メニュー「DNS設定/転送設定」リンクをクリック
2.対象のドメインを選択して「次へ」をクリック
3.DNSレコード設定を利用するの「設定する」をクリック
4.以下の設定で「次へ」をクリック
 ・TYPE:A
 ・TTL:3600
 ・VALUE:サーバーのIP
 ・状態:有効
5.「確認画面へ進む」をクリック
6.「設定する」をクリック

3.wordpress設定

1.wordpressログイン
2.左メニュー「設定>一般」リンクをクリック
3.以下を入力し「変更を保存」をクリック
 ・WordPress アドレス (URL):新規ドメイン
 ・サイトアドレス (URL):新規ドメイン

4.SSL設定(Let's Encrypt)

1.旧ドメイン削除

# certbot revoke --cert-path /etc/letsencrypt/live/[旧ドメイン]/cert.pem

2.旧ドメインを新ドメインの記載に変更

# vi /etc/httpd/conf/httpd.conf
# vi /etc/httpd/conf/httpd-le-ssl.conf

3.新ドメイン追加

# certbot --apache -d 

※1→2と入力した。

What would you like to do?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: Attempt to reinstall this existing certificate
2: Renew & replace the cert (limit ~5 per 7 days)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 1
Keeping the existing certificate
Deploying Certificate to VirtualHost /etc/httpd/conf/httpd-le-ssl.conf

Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you're confident your site works on HTTPS. You can undo this
change by editing your web server's configuration.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2

5.ドメインを登録している外部サイトを変更していく

A8とかのAPSくらいかな?

なにか問題があったら追記します・・・

この記事が気に入ったらサポートをしてみませんか?