Never thought Drupal's way to use relative URLs everywhere in template files was a problem until I happened on https://stackoverflow.com/questions/17187437/relative-urls-in-wordpress and read some arguments against using relative urls of many WP developers including core ones. Copying them here:
- Root-relative URLs aren't really proper. /path/ might not be WordPress, it might be outside of the install. So really it's not
much different than an absolute URL.
- Any relative URLs also make it significantly more difficult to perform transformations when the install is moved. The find-replace
is going to be necessary in most situations, and having an absolute
URL is ironically more portable for those reasons.
- absolute URLs are needed in numerous other places. Needing to add these in conditionally will add to processing, as well as introduce
potential bugs (and incompatibilities with plugins).
- Relative to what, I'm not sure, as WordPress is often in a subdirectory, which means we'll always need to process the content to then add in the rest of the path. This introduces overhead.
- Keep in mind that there are two types of relative URLs, with and without the leading slash. Both have caveats that make this impossible to properly implement.
- WordPress should (and does) store absolute URLs. This requires no pre-processing of content, no overhead, no ambiguity. If you need to relocate, it is a global find-replace in the database.
Now I wonder how much those concerns are legitimate in general, in if they or some of them are, then how much this relates to Drupal in particular?