weixin_39621819
weixin_39621819
2021-01-11 16:46

Support https for WordPress setting URLs in the config

I want to use https. After creating a new site and provisioning, I must go to Settings > General and change WordPress Address (URL) and Site Address (URL) from http to https. It will be great if I can set those URLs to https by default in the config file.

该提问来源于开源项目:Varying-Vagrant-Vagrants/VVV

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

7条回答

  • weixin_39884144 weixin_39884144 4月前

    There is the tls-ca utilities that enabled the support for those. Check your config.yml and our documentation https://varyingvagrantvagrants.org/docs/en-US/references/https/

    We don't want to force https as default in the settings for issues with certificates locally and for compatibility (also usually locally https is not used).

    Varying Vagrant Vagrants
    Setting up https with VVV’s built in certificate authority
    点赞 评论 复制链接分享
  • weixin_39621819 weixin_39621819 4月前

    Sorry. Maybe my issue description is not clear enough. I would like to have a config entry for each site, for example: - https_url: false # false by default. If I set it to true, the WordPress URLs settings will use https after creating site.

    Currently, after creating a site, I must login to wp-admin, change the URLs to https and then login again. I want to reduce this step.

    点赞 评论 复制链接分享
  • weixin_39884144 weixin_39884144 4月前

    Implement this is not so easy as you define, this require this command that will be executed at every provision:

    
    wp search-replace http://domain https://domain
    

    That is not very fast and require also a check inside the database to see if the database is already ported to https (to avoid to repeat again). Right now on a new website installed is enough what you say but on a website that is already used since a while don't execute this command will not fix all the urls in the database. As example, I have a website locally with 1gb database this command will require a lot of time.

    So is better to execute manually because is not good that VVV does a search-replace for the user with the risk of breaking something.

    点赞 评论 复制链接分享
  • weixin_39621819 weixin_39621819 4月前

    Ok. I understand. Thank for spending time on this issue :+1:

    点赞 评论 复制链接分享
  • weixin_39812065 weixin_39812065 4月前

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

    点赞 评论 复制链接分享
  • weixin_39812065 weixin_39812065 4月前

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

    点赞 评论 复制链接分享
  • weixin_39989941 weixin_39989941 4月前

    Thanks for opening your first issue here! Be sure to follow the issue template and include your OS/Vagrant/VVV versions! Don't forget you can get support in the VVV slack at https://varyingvagrantvagrants.org/docs/en-US/slack/

    Varying Vagrant Vagrants
    Join the VVV Slack Workspace
    点赞 评论 复制链接分享

相关推荐