It doesn’t work wether it is enabled or disabeld.
With out merging enabled:
<link rel='stylesheet' id='wpo_min-header-0-css' href='https://wp-content/cache/wpo-minify/1673751005/assets/wpo-minify-header-c830677b.min.css' type='text/css' media='all' />
I had a look through the PHP in the plugin and worked it out though. WP-Optimize is using WP_CONTENT_URL (line 39 – class-wp-optimize-minify.php).
WP_CONTENT_URL =
define( 'WP_CONTENT_URL', get_option( 'siteurl' ) . '/wp-content' );
I am using an azure hosted wordpress instance and it has some weird settings in wp_config by default including siteurl:
define('WP_SITEURL', 'https://'. filter_input(INPUT_SERVER, 'HTTP_HOST', FILTER_SANITIZE_STRING));
INPUT_SERVER isn’t defined at all by default and I am not sure if this is something that can be done in the azure portal as I don’t work in infastructure I don’t have visilibity of it. That being said hardcoded ‘https://’ in the definition of WP_SITEURL sounds very wrong and after doing a google search it looks like people have ran in to this issue https://arlanblogs.alvarnet.com/change-http-to-https-in-azure-hosted-wordpress-website-when-option-grayed-out/
I just removed the definition for WP_HOME and WP_SITEURL so that I could edit these settings within the WP dashboard which fixed the issue. Luckily I have write access to wp_admin.php.
It’s an issue that only happens to people using azure app services but it could be fixed by not including WP_CONTENT_URL when defining WPO_CACHE_MIN_FILES_URL if WP_CONTENT_URL is incorrect.
Thanks.
-
This reply was modified 2 years, 1 month ago by
finnsk3.