How to make Cloudflare Flexible SSL work with WordPress
Support
Last Update 4 år siden
WordPress is a great and very popular website building tool, and Cloudflare is a great way to get HTTPS on your website for free. Thanks to Cloudflare's Flexible SSL system, you don't even need to manage SSL certificates to use it!
However, getting WordPress to show a padlock and make all pages work can be a bit tricky. This article explains a good way to configure your website correctly with Cloudflare Flexible SSL.
Ensure your WordPress admin area is currently accessible
If you've already attempted to make WordPress available on HTTPS yourself, you may have locked yourself out of your WordPress admin area. If so, you should probably see this error: ERR_TOO_MANY_REDIRECTS.
To regain access to your WordPress admin area, you can do the following:
1. Go to phpMyAdmin, find your WordPress database and click Connect Now.
2. Find the table with the name ending with _options and click on the name.
3. Find the rows with the column option_name matching siteurl and home. These should be the first two in the list, but you can use the Search function if you can't find them.
4. Double click the value in the option_value column, and change the start of the URL from https:// to http:// .
If you have multiple databases and you don't know which database corresponds to your WordPress website, you can find your database in the installation details in Softaculous, or by checking the wp-config.php of your WordPress installation.
With this option changed, you should be able to login to the WordPress admin area again.
Make sure your Cloudflare settings are clean
If you've just enabled Cloudflare, all the Cloudflare settings should be standard, which is good.
If you've already tinkered with the Cloudflare settings before trying to get HTTPS to work, here are some settings to verify:
1. In the SSL/TLS -> Overview tab, Encryption Mode is set to "Flexible".
2. In the SSL/TLS -> Edge Certificates tab, the setting "Always Use HTTPS" is set to Off.
3. In the SSL/TLS -> Edge Certificates tab, the setting "Automatic HTTPS Rewrites" is set to Off.
Install the Really Simple SSL plugin
The easiest way to get Flexible SSL to work properly is with the plugin called Really Simple SSL. You can install the plugin automatically through the WordPress admin area.
From there, making HTTPS work is as simple as hitting the enable button to make HTTPS work for both your front website and WordPress admin area!
After enabling the plugin, you can also enable the .htaccess in Really Simple SSL, enable Always Use HTTPS in Cloudflare, or both, to enforce HTTPS on all pages.