OK, the plugin will only save URLs as relative after it is installed. It doesn’t change those that have already been saved as absolute.
If you only have a few posts or pages, you can edit each one and save it again. Do this when it is running from the internal IP address if that’s the URL used when the post was created.
Alternatively, you can add a filter to functions.php that tells the plugin to look for a specific URL and replace it with your new URL. For example:
add_filter( 'of_absolute_relative_urls_related_sites',
function( $related_sites ) {
$related_sites[] = "https://192.159.0.100";
return $related_sites;
}
);
If you want to run from both URLs as the same time, you can define the wordpress and site URLs in wp-config.php. This tells WP to use the URL from the browser instead of the URLs in Settings. Here is the code for this:
define( 'WP_SITEURL', $_SERVER['REQUEST_SCHEME'] . '://'. $_SERVER['HTTP_HOST'] );
define( 'WP_HOME', $_SERVER['REQUEST_SCHEME'] . '://'. $_SERVER['HTTP_HOST'] );
Let me know how you make out.
Andrew P.
-
This reply was modified 2 years, 11 months ago by intuitart.
-
This reply was modified 2 years, 11 months ago by intuitart.
-
This reply was modified 2 years, 11 months ago by intuitart.