So in general there are two opinions on absolute versus relative URLs:
- use relative URLs because easier to move around
- use absolute URLs because easier to move around
Confusing, yes. The argument boils down to that migrating things with relative URLs you don’t need to change domain. The counter argument is that you might need to change levels or URLs and then relative suddenly turns into complete nightmare.
Regardless of which camp is “right” — WordPress is firmly in the absolute URL camp. All it’s API functions will output absolute URLs and it’s intended workflow for anything related in it.
Related Posts:
- Custom plugin route in WordPress
- Why is ?doing_wp_cron being appended to my URLs
- Change default URL path (/blog/) of blog posts
- How to deal with WordPress on localhost
- How to convert the file path to a URL of the same file?
- Why is WordPress saving full-urls to the database?
- How to remove /index.php/ from URL’s
- Force the Website URL to Include “www” and to be Upper Case?
- How to remove “http://” When Echoing URL?
- WordPress and $_GET Params
- List of default WordPress URLs
- Why WP encodes UNICODE (UTF8) containing urls? Any drawbacks of UNICODE url?
- Unable to load static front page on home url
- Force home page to be https?
- How do I amend the fixed “author” part in the URL?
- Change homepage url
- get_site_url is not returning anything?
- Check what is at URI (post, archive, etc…)
- Use image url with add_image_size
- Changing my site url from azure.net to custom domain
- Special domain for a page
- How to delete unused URL?
- urlencode query string in gravity forms confirmation redirect
- Pages other than Home page not displayed even when URL is good
- How to server wordpress from SSL and non-SSL URLs
- Author Nickname URL Friendly
- Set a custom URL for image in the Media Library?
- wp_insert_post – How do I prevent incremental numbers on child pages?
- Dynamic URL based on user_metadata
- How to edit URL Slug?
- Check if user is logged in to site A when visiting site B
- Publish Post when URL is available else reschedule the post in wordpress [duplicate]
- Change url links on members loops in buddypress
- Find file url in post content and add it to media library
- Localhost port is missing on some links after downgrading MAMP [closed]
- Avoid the removal of “https:” from URLs
- Content duplication issue with dynamic URLs
- rewrite taxonomy-{taxonomy}-{term}.php terms
- Why am I seeing all these weird ‘loginid’ requests?
- Confusion about Site url and directory
- Multiple URLs with Numbers
- Remove trailing slash from previous_posts_link()
- hijacking home_url for root relative paths
- How to properly print a 404 error without redirecton? (i.e. keeping the current URL)
- Will get_bloginfo(‘url’) return URL with backslash?
- Can anybody provide me with a function to generate slugs?
- Is there RELATIVE_PATH, like ABSPATH
- Accessing WordPress using “localhost” and local ip at the same time
- How can I identify which file/function will be used to respond to a particular URL?
- Porting site URLs to new host but with same domain name [closed]
- My #id is not showing in the url when the user clicks on the anchor tag
- Is there a way to test if a URL is part of the current blog?
- Showing my server ip in source code for several links not for all links
- Could not find the wordpress page
- An anchor name (id name) in the address bar
- Moving Website-URL
- How to prevent unknown addresses which are accessed from my wordpress website [closed]
- get_template_directory() returns wrong address on VPS
- Is there an URL listing latest posts
- Make custom system url
- Image not showing up in media loader success area – followup
- How do I allow http/ftp access to files I have uploaded?
- Redirecting URL with Twitter Button API Not Working
- Need help changing back the correct wordpress url
- Adding Parent Categories and keep current URLs
- Different url to same page (with dynamic content)
- How rewriting a url to make it SEO friendly
- WordPress option com_jce should not work
- Too many redirects (ERR_TOO_MANY_REDIRECTS) only on one page
- Add a paramter to page url
- WordPress Still Requesting Old Url
- Broken Images and Style
- Why my URL has an unknown character string?
- No url when downloading PDF
- Allow duplicate slugs for pages and posts
- Post not redirecting to non www after changing from www
- i1.wp.com url problem (Jetpack not installed)
- incorrect url in Snippet editor
- Use URL parameter to create dynamic content
- Generate new URL for popup form
- In-page link works in Firefox but not in Chrome
- My website has some Crawling Errors?
- WordPress dynamic subpage for ACF
- How can I modify the ‘Insert/edit link’ option to offer root-relative urls?
- Modify the WordPress URL
- Duplicate pages with ?s parameter
- How to pass REQUEST_URI to function
- Populate Website URL at registration time
- WordPress Update Links
- bloginfo no show the right path
- After site transfer I’m still getting redirected to the old site (WordPress)
- help me remove this additional parameter in url
- All font sizes change when manually typing 2011 into url and going to archive page
- apply styling only to a specific url
- URL, which automatically close tab
- How to run Wiki on the same host as WordPress and not get 404 errors when browsing to Wiki?
- How to write url to display all posts of certain type and taxonomy with given term_id
- What purpose does /embed/ URL have and how to avoid SEO problems?
- Where can I add list of external URL for WP ADD link tool?
- WordPress page URL: Get rid of /wp-content/… part from URL