wp cli - WP-CLI update date and time format

I'm new to WP-CLI. After a lot of Googling and searching in this forum, I haven't found out which is the comma

I'm new to WP-CLI. After a lot of Googling and searching in this forum, I haven't found out which is the command to update both date and time formats.

wp option update......

Thanks for any help!

Regards

I'm new to WP-CLI. After a lot of Googling and searching in this forum, I haven't found out which is the command to update both date and time formats.

wp option update......

Thanks for any help!

Regards

Share Improve this question asked Sep 1, 2019 at 15:34 Roberto JobetRoberto Jobet 1937 bronze badges 1
  • Last example in this list: developer.wordpress/cli/commands/option/update/#examples – norman.lol Commented Sep 1, 2019 at 17:19
Add a comment  | 

1 Answer 1

Reset to default 8

The wp-cli command structure would be:

wp option update timezone_string "American/New_York"

So:

  1. option to act on a WordPress option
  2. update to update the option
  3. the option name, in this case 'timezone_string'
  4. the new value, in this case 'American/New_York'

Items 3 and 4 are defined by WordPress, a plugin, or other custom code.

Number 4, the value may have only a limited number of valid values. In this case, something other than a standard timezone would cause problems.

Generally speaking, I update the timezone, time format and start of week to Sunday.

wp option update timezone_string "America/New_York"
wp option update time_format "g:i A"
wp option update start_of_week 0

So research your basic WordPress options to determine the option name and the valid values, then structure your command line appropriately.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745195324a4616059.html

相关推荐

  • wp cli - WP-CLI update date and time format

    I'm new to WP-CLI. After a lot of Googling and searching in this forum, I haven't found out which is the comma

    6小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信