Enable MMR when home_url and site_url are different
-
Hello, I’m setting up a WordPress blog and may switch to headless in the near future. As such, to avoid resetting everything when I move, I have setup different home_url and site_url in wp-config.php
When setup this way, MMR will only work on the site_url since most plugins will add scripts and styles this way
This does not work for a decoupled setup
I was able to fix this with the following code from
merge-minify-refresh.php
line 513$wp_host = parse_url(get_site_url(), PHP_URL_HOST); // if( !$url_host || $url_host == $this->host) if( !$url_host || $url_host == $this->host || $url_host == $wp_host)
Is there somewhere this can get added into the plugin so I don’t have to edit every-time the plugin is updated
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Enable MMR when home_url and site_url are different’ is closed to new replies.