Title: Cannot Switch PHP Version When Using WP_HTTP_BLOCK_EXTERNAL
Last modified: February 21, 2020

---

# Cannot Switch PHP Version When Using WP_HTTP_BLOCK_EXTERNAL

 *  Resolved [jetxpert](https://wordpress.org/support/users/jetxpert/)
 * (@jetxpert)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/cannot-switch-php-version-when-using-wp_http_block_external/)
 * Hi there,
 * For security reasons, we’re using the following commands in our wp-config.php
   file:
 * `define('WP_HTTP_BLOCK_EXTERNAL', true);`
 * `define('WP_ACCESSIBLE_HOSTS', '*.wordpress.org, *.siteground.com, *.sgcpanel.
   com');`
 * The above commands work great for our site with the following exception:
 * We have to change
 * `define('WP_HTTP_BLOCK_EXTERNAL', true);`
    to `define('WP_HTTP_BLOCK_EXTERNAL',
   false);`
 * in order to change our PHP version using the SG Optimizer plugin
 * **Affected Plugin Path: **
 * WP > SG Optimizer > Environment Optimization > Set Your PHP Version > PHP Management
   Method > Set Manual PHP Version
 * **Question:**
 * What URL or HTTP site is being used by SiteGround to update the PHP version? 
   We’d like to add it to the above list of websites (i.e., URLs). Above URLs do
   not work.
 * Thank you!
    -  This topic was modified 6 years, 3 months ago by [jetxpert](https://wordpress.org/support/users/jetxpert/).
    -  This topic was modified 6 years, 3 months ago by [jetxpert](https://wordpress.org/support/users/jetxpert/).

Viewing 1 replies (of 1 total)

 *  Thread Starter [jetxpert](https://wordpress.org/support/users/jetxpert/)
 * (@jetxpert)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/cannot-switch-php-version-when-using-wp_http_block_external/#post-12473810)
 * Good Day!
 * Update:
 * After thorough research, found a solution (fix) for our issue:
 * (1) We installed the plugin “Snitch” (this plugin detects all website outgoing/
   incoming http requests).
 * (2) After we installed the plugin, we attempted again to change the PHP version
   of our website using SG Optimizer.
 * (3) The plugin “Snitch” revealed that the PHP version request was being processed
   by the URL: **updates.sgvps.net**.
 * (4) We whitelisted (i.e., inserted) `updates.sgvps.net` in our list of ‘WP_ACCESSIBLE_HOSTS’
   and, voila, our problem was fixed.
 * Anyway, would like to recommend SiteGround add the above information to their
   knowledgebase in order to help others when using the above wp-config.php commands.
 * Thank you!
    -  This reply was modified 6 years, 3 months ago by [jetxpert](https://wordpress.org/support/users/jetxpert/).

Viewing 1 replies (of 1 total)

The topic ‘Cannot Switch PHP Version When Using WP_HTTP_BLOCK_EXTERNAL’ 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/)

## Tags

 * [cannot change](https://wordpress.org/support/topic-tag/cannot-change/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * 1 reply
 * 1 participant
 * Last reply from: [jetxpert](https://wordpress.org/support/users/jetxpert/)
 * Last activity: [6 years, 3 months ago](https://wordpress.org/support/topic/cannot-switch-php-version-when-using-wp_http_block_external/#post-12473810)
 * Status: resolved