LoginSignup
3
2

More than 5 years have passed since last update.

WP-CLIでDBを出力する際のファイル名を「年月日_時分秒_DB名.sql」にするコマンド

Last updated at Posted at 2016-08-17

開発時にロールバックしたいときなどに備えて。wp evalなんて初めて使ったよ。

wp db export `env TZ=Asia/Tokyo date "+%Y%m%d_%H%M%S"`_`wp eval 'echo DB_NAME;'`.sql

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