Relative URLs in WordPress

前端 未结 8 1274
执念已碎
执念已碎 2020-12-04 07:29

I\'ve always found it frustrating in WordPress that images, files, links, etc. are inserted into WordPress with an absolute URL instead of relative URL. A relative url is mu

8条回答
  •  春和景丽
    2020-12-04 08:11

    I agree with Rup. I guess the main reason is to avoid confusion on relative paths. I think wordpress can work from scratch with relative paths but the problem might come when using multiple plugins, how the theme is configured etc.

    I've once used this plugin for relative paths, when working on testing servers:

    Root Relative URLs
    Converts all URLs to root-relative URLs for hosting the same site on multiple IPs, easier production migration and better mobile device testing.

提交回复
热议问题