Tagged: links
when you create an internal link to another page or image/media, wordpress automatically adds the domain to it.
so instead of having a root-relative path like “/page” or “/path-to-image”, it becomes “http://domain.com/page” or “http://domain.com/path-to-image”.
all the plugins & code additions to the functions.php file don’t seem to work anymore (that i can find).
some examples i’ve found that don’t work anymore are…
https://joshuatz.com/posts/2019/wordpress-relative-stylesheets-scripts-plus-wp-config-php-order/
https://www.webhostinghero.com/how-to-make-all-internal-links-relative-in-wordpress/
https://stackoverflow.com/questions/17187437/relative-urls-in-wordpress
…is this just something WP doesn’t allow for anymore?
does anyone have a working option?
thanks.
anyone? anyone?
Hi,
Sorry for the late reply, I have not seen any working solutions to this, I think WordPress is discouraging this.
Best regards,
Mike
@Mike
understood. thanks.
if you all have any recommendations on best methods when transferring a site from development server to live server – converting all the domains in bulk – i’d appreciate it.
i suspect (like with so many other things) it’ll be the job for a plugin – if that’s the case, i’m also open to which one’s are the best & most stable & easiest to use.
thanks.
Hi,
I prefer the Duplicator plugin by Snap Creek. The last step it does is to correct the domain URLs with an auto search and replace.
Otherwise, you can use the Better Search Replace plugin to correct the domain.
Best regards,
Mike