On Thu, Nov 24, 2011 at 10:43:20AM +0000, MJ Ray wrote:
Chris Green cl@isbd.net
I've now discovered that it is horrendously awful to move it to another domain! Not only are links in WordPress absolute but there are also loads of database entries which have the absolute URL in them.
It sounds like something has been putting absolute links in the database when usually only relative URLs are used. I've moved lots of WordPress sites between domains (for work - http://www.software.coop/products/web/social/ ) and it's not been too bad.
So one has to fix all the links in pages one has created *and* one has to search through the database and fix URLs there too. Aaaarrrrgggghhhh!!!!
I think I had one move which had that problem and I fixed it by doing search and replace in mysql. Not great but it worked.
Yes, I'm not *sure* that I've got any URLs in the database but I don't want to find out the hard way by things not working after the move.
I have just taken a look, there *are* absolute URLs in there, in wp_postmeta and wp_posts (not surprising since there are absolute links on the posted pages).
Setting the 'WordPress Address' and the 'Site Address' on the dashboard settings page only fixes URLs generated by the code (i.e. the menu links to pages).
Most URLs should be generated by the code. It really sounds like something is wrong on your WordPress. Maybe a bad plugin?
As far as I can see any links inserted using the WYSIWYG editor will be absolute. This is the real killer. Thus I have a set of top level pages accessible using he menu across the top of the page, these work perfectly when you change the dashboard settings. However any links you insert on the pages (using the list of pages presented to you when you use the WYSIWYG editor) have absolute URLs. Similarly links to images have absolute URLs.
Apart from anything else it makes doing maintenance/development a nightmare.
Is there any way around this or is the only approach for maintenance to have two parallel sites one 'development' and one 'live' where one tries out changes on the development site and then repeats them (hopefully correctly) on the live site.
As far as possible, use the theme and plugin systems and try not to hack the core. Most things can be done through them.
Absolutely standard WordPress version 3.2.1 with no added plugins and using a theme from wordpress.org, can't get much more standard than that!
It's fixable but I really don't like having to do this sort of thing because it's so error prone. It's so unnecessary too, the basic problem is that the WYSIWYG editor inserts absolute URLs.