LoginSignup
4
4

More than 5 years have passed since last update.

ドットインストールを参考にwordpressを構築していてつまづいたポイント

Posted at

まえがき

長い人生,誰しも一度はwordpressを構築してサイトを立ち上げることになります.
その際にhttps://dotinstall.com を参考にする人も多いのではないでしょうか.

・WordPress入門 (全23回)
https://dotinstall.com/lessons/basic_wordpress#!comments

今回は「wordpress入門」動画の2本め,5分弱にして数カ所つまづいたので,備忘録を残すことにしました.
(そもそもphp知らずにwordpress使うのが間違ってたと思いますが…)

要するにwordpressのログイン画面にアクセスするまでの奮闘記録です!

参考動画

本当はここへんをきっちり勉強してから見る動画っぽいですね!
・ローカル開発環境の構築 macOS編
http://dotinstall.com/lessons/basic_localdev_mac_v2
・PHP入門 (全30回)
http://dotinstall.com/lessons/basic_php_v2
・MySQL入門 (全19回)
http://dotinstall.com/lessons/basic_mysql_v2

wordpressがPHPで動いてることを今回始めて知ったぐらい,私はド素人です(´・ω・`)

つまづいたポイント

ポイント1:Apacheのテストページが出る

wordpressのログイン画面を触ろうと思ったらこんなの出るんですよ…
error1.jpg

以下の記事を参考に対応しました!
たゆまかニュース:WordPressをApacheで動かしたとき、テストページのままなときは
http://www.tkoyama.com/archives/2766/

sudo vi /etc/httpd/conf/httpd.conf

httpとhttpdの違いを知らないので混乱しました…恥ずかしい.
とりあえず,上記コマンドにてファイルを編集します(´・ω・`)

402 DirectoryIndex index.html index.html.var

↓変更

402 DirectoryIndex index.html index.html.var index.php
1003 # <VirtualHost *:80>
1004 #     ServerAdmin webmaster@dummy-host.example.com
1005 #     DocumentRoot /var/www/html/dummy
1006 #     ServerName dummy-host.example.com
1007 #     ErrorLog logs/dummy-host.example.com-error_log
1008 #     CustomLog logs/dummy-host.example.com-access_log common
1009 # </VirtualHost>

↓変更

1003 <VirtualHost *:80>
1004     ServerAdmin webmaster@dummy-host.example.com
1005     DocumentRoot /var/www/html/wordpress
1006     ServerName dummy-host.example.com
1007     ErrorLog logs/dummy-host.example.com-error_log
1008     CustomLog logs/dummy-host.example.com-access_log common
1009 </VirtualHost>

これらの編集の結果,以下の表示に!!!
wordpressのディレクトリにはアクセスするようになったようで一安心です…

スクリーンショット 2018-01-16 22.03.52.png

つまり,どういうことだってばよ…

ポイント2:データベース接続確立エラー

そもそも,手順通りに操作してたのが合ってるのか不安…
ってことで,データベースが作成できているか調べます(´・ω・`)

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
+--------------------+
3 rows in set (0.02 sec)
mysql> 

そもそもこれの見方が分からない…
ってことで,諦めてmysqlを勉強してきます…

と,思いましたが,管理者権限を持ってcreate database dotinstall_wordpressをしただけで解決しました…
何かエラーコードでも読み飛ばしてたかな…

あとがき

現役離れすぎていてもうダメだぁ〜
ってことで,ボチボチちゃんとQiitaを利用していこうと思います.(今更感)

とりあえず,それっぽくHP作ってみます...

4
4
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
4
4