Title: Enforce HTTPS and Insecure Content Fixer issue
Last modified: April 30, 2024

---

# Enforce HTTPS and Insecure Content Fixer issue

 *  Resolved [Mirco Babini](https://wordpress.org/support/users/mirkolofio/)
 * (@mirkolofio)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/enforce-https-and-insecure-content-fixer-issue/)
 * Those options are not working on GreenGeeks. The reason has been found into SiteGround_Optimizer\
   Ssl\Ssl class, method switch_protocol().
 * The exec() function for the wp search-replace command returns:
    – status = 255–
   output =
 *     ```
       array(7) {
         [0]=>
         string(24) "X-Powered-By: PHP/7.4.33"
         [1]=>
         string(38) "Content-type: text/html; charset=UTF-8"
         [2]=>
         string(0) ""
         [3]=>
         string(76) "WP-CLI only works correctly from the command line, using the 'cli' PHP SAPI."
         [4]=>
         string(73) "You're currently executing the WP-CLI binary via the 'cgi-fcgi' PHP SAPI."
         [5]=>
         string(100) "In case you were trying to run this file with a web browser, know that this cannot technically work."
         [6]=>
         string(171) "When running the WP-CLI binary on the command line, you can ensure you're using the right PHP SAPIby checking that <code>php -v</code> has the word 'cli' in the first line of output."
       }
       ```
   
 * Let me know if this is something you can work around or make compatible somehow.
   
   Or if there’s a way to change the php sapi cli to cgi-sfgi. Maybe using system()
   or passthru()?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [Mirco Babini](https://wordpress.org/support/users/mirkolofio/)
 * (@mirkolofio)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/enforce-https-and-insecure-content-fixer-issue/#post-17724849)
 * Or maybe just telling the UI the error is something with the exec, and let me
   run the command manually (then activate the options even if in a manually manner).
 *  Plugin Support [Preslav Kenanov](https://wordpress.org/support/users/preslavkenanov/)
 * (@preslavkenanov)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/enforce-https-and-insecure-content-fixer-issue/#post-17724989)
 * Hello [@mirkolofio](https://wordpress.org/support/users/mirkolofio/),
   The error
   you encounter indicates that you are trying to use the WP-CLI binary via cgi-
   fcgi (FastCGI PHP Processing). This error is related to the hosting environment
   and not the Speed Optimizer plugin. As such, in order to address this issue, 
   it would be best to get in touch with your hosting provider and ask them for 
   a way to change the PHP Handler from cgi-fcgi to php-cli in order to be able 
   to use WP-CLI. After that you will be able to execute the [WP-CLI commands associated with the Speed Optimizer plugin](https://eu.siteground.com/tutorials/wordpress/speed-optimizer/wp-cli/).
 * Kind Regards,
 * Preslav

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Enforce HTTPS and Insecure Content Fixer issue’ is closed to new replies.

 * ![](https://ps.w.org/sg-cachepress/assets/icon-256x256.gif?rev=2971889)
 * [Speed Optimizer - The All-In-One Performance-Boosting Plugin](https://wordpress.org/plugins/sg-cachepress/)
 * [Support Threads](https://wordpress.org/support/plugin/sg-cachepress/)
 * [Active Topics](https://wordpress.org/support/plugin/sg-cachepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sg-cachepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sg-cachepress/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Preslav Kenanov](https://wordpress.org/support/users/preslavkenanov/)
 * Last activity: [2 years, 1 month ago](https://wordpress.org/support/topic/enforce-https-and-insecure-content-fixer-issue/#post-17724989)
 * Status: resolved