Improved HTTPS detection and migration in WordPress 5.7

Einfach Dinge, die nichts mit XAMPP, Apache Friends, Apache, MySQL, PHP und alle dem zu tun haben. Allerlei halt. ;)

Improved HTTPS detection and migration in WordPress 5.7

Postby unleash_it » 23. February 2021 00:30

Improved HTTPS detection and migration in WordPress 5.7

head over to the developer-site:

just read what is new:

Improved HTTPS detection and migration in WordPress 5.7
WordPress 5.7 will feature a number of enhancements which simplify the migration of a site from HTTP to HTTPS. As the foundation for providing the user with more accurate recommendations, WordPress will be able to detect whether the current environment already supports HTTPS. If this is the case, it provides a call-to-action button in the HTTPS status section in Site Health, which switches the site from HTTP to HTTPS with a single click.

Overall guidance in the Site Health section has been improved, now allowing hosting providers to supply a custom URL with instructions or for a one-click update.

Detecting state of HTTPS and environment support
WordPress 5.7 introduces a new function wp_is_using_https(), which returns true if both the “Site Address” (home_url()) and “WordPress Address” (site_url()) are using HTTPS as their scheme. Essentially, changing both of these URLs to HTTPS formally indicates that the site is using HTTPS. While there are other ways to enable HTTPS partially in WordPress (e.g. with the FORCE_SSL_ADMIN constant), the new detection mechanism focuses on using HTTPS throughout the entire site, i.e. its frontend and backend.

In addition to providing a single function for checking whether HTTPS is being used, a new detection function wp_is_https_supported() can be called to check whether the environment supports HTTPS correctly. This is now used in Site Health to provide more accurate feedback: If the environment already supports HTTPS, the user can make the switch instantly, without involving their hosting company. Under the hood, the detection function is based on a new internal option https_detection_errors, which is controlled by a twice-daily Cron hook that works as follows:

Improved Site Health guidance
The HTTPS Status section in Site Health has been improved to guide the user more towards using HTTPS. If the environment already supports HTTPS (via wp_is_https_supported()), the UI will now include a button to switch both site URLs with a single click (using wp_update_urls_to_https()). Users will need to have a new update_https meta capability in order to perform the switch; by default this capability is granted to every user that can both manage_options and update_core.

head over and read more:
for Wordpress-development :: super toolkits a. :: and b.
:: Awesome WordPress: A curated list of amazingly awesome WordPress resources, themes, plugins and shiny things.
User avatar
Posts: 279
Joined: 10. December 2011 18:32
Operating System: linux opensuse 12.1

Return to Allerlei

Who is online

Users browsing this forum: No registered users and 3 guests