1
0

More than 5 years have passed since last update.

WordPress 投稿が反映されない

Last updated at Posted at 2019-05-31

WordPress : 新規構築時の設定不足

環境   
- mac
- Vagrant CentOS7
- WordPress5.2.1

Vagrant にて CentOS7 を構築後 WordPress をインストールしたけれど・・・

新規投稿が 予約投稿 になり反映されない。

WordPress管理画面 -> 一般設定
タイムゾーンは UTC+9 設定済み

ターミナルから date
日本時間が表示される ( OK )

php.ini を確認
vi /etc/php.ini
検索
/time.zone
date.timezone = "Asia/Tokyo" 設定済み( OK )

念のため ターミナルから
php -r "echo date('Ymd H:i:s');"
日本時間が表示される ( OK )

なんらかの時刻がらみの設定がわるい・・・locale?

そこで

[root@centos75 webdimension]# timedatectl
      Local time: Wed 2019-05-29 19:02:47 JST
  Universal time: Wed 2019-05-29 10:02:47 UTC
        RTC time: Wed 2019-05-29 10:02:47
       Time zone: UTC (JST, +0900)
     NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: no
      DST active: n/a

Time zone: UTC (JST, +0900) このへんかな?と思い、

[root@centos75 webdimension]# timedatectl set-timezone Asia/Tokyo
[root@centos75 webdimension]# timedatectl
      Local time: Wed 2019-05-29 19:03:55 JST
  Universal time: Wed 2019-05-29 10:03:55 UTC
        RTC time: Wed 2019-05-29 10:03:55
       Time zone: Asia/Tokyo (JST, +0900)
     NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: no
      DST active: n/a

Time zoneがかわった!
WordPressで投稿を作りなおしたら通常の動きになりました。
サーバーの設定不備でした。

1
0
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
1
0