- http://yourdomain.com is accessible. (Make sure protocol is
http
) - Update Cloudflare DNS see topic
Minimum DNS settings
Type | Value | Proxied Status |
---|---|---|
A | 0.0.0.0 |
Proxied |
CNAME | @ | Proxied |
NOTE: Replace 0.0.0.0
with your host IP address.
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/local/bin/wp
wp --info
REF: https://wp-cli.org/
wp db export <filename.sql>
wp search-replace 'http://yourdomain.com' 'https://yourdomain.com'
NOTE: Make sure no tailing slash.
Installing this plugin will fixed the redirect loop.
wp plugin install cloudflare-flexible-ssl
wp plugin activate cloudflare-flexible-ssl
Troubleshooting
- If you encounter error
cannot create file or directory
, make sure your logged in user has rights to do it. - Plugin name may be changed in the future, you may use
wp plugin search cloudflare
and use slug instead.
- Go to menu
SSL/TLS -> Overview
- Check option
Flexible
This step tell to make encryption only between browser and cloudflare. Cloudflare and server use http communication as before.
- Go to menu
SSL/TLS -> Edge Certificate
- Turn on option
Always Use HTTPS