WP uses absolute URLs for images, and that should be it. The rest are generated from your database.
Thread Starter
Tandem
(@tandem)
I am not sure what you mean by: ‘The rest are generated from your database’.
WP uses absolute URLs for everything. I am working on a simple site with 13 pages, no posts, only few images and internal links, yet the DB has 400+ occurrences of http://DomainName.com
Every time you move your site you have to do a mass find and replace for anything to work in your new location.
The permalinks for your site, from an archive or category or tags page, are dynamically generated.
The only absoulte URLs would be twofold, now that I think about it.
1) Images. Yes, we know, there’s been no better way to support the majority of sites yet.
2) Internal links you created manually.
Everything else, though, if you use the dynamic links in menus and archives, are indeed dynamic and don’t need to be changed.
Mind you, YES, if you move your site to a new domain, you ALWAYS should search/replace olddomain/newdomain. That’s just sensible 🙂 And listed in the codex 😉
Thread Starter
Tandem
(@tandem)
The suggestion was to make the migration of a WP site between different locations easier by making the extra step of find and replace through the DB unnecessary.
The site admin should be able to move or copy WP site from one server to another by just copying the file structure, exporting the DB and changing the DB info in the wp-config.php file.
Not going to happen.
Images are absolute URLs. End of story. They just are. Yes, it sucks, yes it SHOULD be better, but as of yet, it’s not. Because of that alone, you will always need to search/replace. Sorry.
http://yoast.com/move-wordpress-blog-domain-10-steps/
I will point out that it’s a good thing to do anyway, for ANY site on any software. You never know where someone (maybe you, maybe someone else) hard coded in something they shouldn’t have.
Do I get to be Mary Queen of Scots? 🙂
Thread Starter
Tandem
(@tandem)
Mary I of England more likely
I’d rather be Anne Boleyn. I get a fun song.
Anyhow. If you want to see some older (and still valid) discussions on the matter, check http://wordpress.org/support/topic/using-relative-instead-of-absolute-links-for-images
Also here’s a feature req for in-page URLs to be relative: http://core.trac.wordpress.org/ticket/6599
Otto’s one of the devs.
I’m really just the messenger with a fun title.
I would like to help out with this. Perhaps writing a script that would move root domain name?