Change all occurrences of “http” to “https” on a wordpress page

后端 未结 8 1492
心在旅途
心在旅途 2021-02-04 19:33

I am in the process of implementing SSL on some of my wordpress-powered site\'s pages. Currently I\'m getting mixed content warnings on the secured pages - my custom theme inclu

8条回答
  •  深忆病人
    2021-02-04 20:26

    After all the other migration steps if you still get mixed-content:

    sudo apt-get install php5-cli
    curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
    pushd /var/www/path/
    php /path/to/wp-cli.phar search-replace 'http://example.com' 'https://example.com' --skip-columns=guid --dry-run
    

    if ok,

    php /path/to/wp-cli.phar search-replace 'http://example.com' 'https://example.com' --skip-columns=guid
    

    from: https://helgeklein.com/blog/2015/01/switching-wordpress-site-http-https/

提交回复
热议问题