wp config - WP_SITEURL vs WP_HOME link output

admin2025-06-04  1

When WP_SITEURL and WP_HOME are set to different values - for example and - the output links are inconsistent.

Thus, a permalink output will be relative to WP_HOME like but if you call for something like a thumbnail url it will return a link relative to WP_SITEURL, such as .jpg

I'm aware that this is the convenient behaviour, but for this one use case I'd rather have it output relative to `WP_HOME - as in .jpg - the reason being that I'm migrating an archive and I chose to symlink new folders to old rather then change the urls for the whole thing.

It could of course be done by wrapping all calls into regex functions but I was wondering if there's a more elegant, general setting in order to achieve this.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1748982331a315365.html

最新回复(0)