[wp-hackers] Two new, long-overdue plugins to make your wordpress life a little easier...

Marcus Pope Marcus.Pope at springbox.com
Fri Oct 28 19:54:58 UTC 2011


> Relative URLs are great until they don't work: the RSS issue is significant.

Mickey, wordpress processes all of your urls every time you host your page or export via rss/email.  What we propose is that you only need to process those URL's when you export via RSS, via a simple function call.  They are always considered as a use case with this concept and are not broken when you choose to host via root-relative ulrs.

Additionally there are things that don't ever make it into an rss feed that are still forced and munged into an absolute URL like local css and javascript files.  These create headaches when moving through staging environments for enterprise developers.

> When I migrate, it means search-and-replace in the database

And that will break your serialized data if any of your plugins encode data that way or if your site uses any widgets.

> So what's my process?  I backup twice, think for a long time, and search-and-replace in the database.  If I started the site and
> there are no complications, I keep it simple: from dev.domain.com to www.domain.com is a much simpler operation.  As I
> said, I never assume that there are no absolute URLs, regardless of CMS.

With a modern CMS, you don't have to do this.  You should make a backup, but you should never have to programmatically grep or replace your database, it will cause problems at some point down the road.  What is simpler, than not having to do that at all?

-----Original Message-----
From: wp-hackers-bounces at lists.automattic.com [mailto:wp-hackers-bounces at lists.automattic.com] On Behalf Of mickey panayiotakis
Sent: Friday, October 28, 2011 2:27 PM
To: wp-hackers at lists.automattic.com
Subject: [wp-hackers] Two new, long-overdue plugins to make your wordpress life a little easier...

Relative URLs are great until they don't work: the RSS issue is significant.
 Also, if I enter something on the editor (including an absolute URL), I expect (nearly) exactly that to go in the database. I never rely on systems to always only use relative URLs.  When I migrate, it means search-and-replace in the database.  Some of these are easier than others.
 Moving from "dev.domain.com" to "www.domain.com" seems the easiest.  Then again the domain is often somehow listed in the directory structure, and that may not change right away. In theory there shouldn't be any filesystem structure in the database, but that's theory.  There's moving from dev.domain.com/wordpress to www.domain.com. And somewhere in the process client decided domain should be different, so it's moving from dev.domain.com/wordpress to www.newdomain.com.

And moving websites does take a bit of time to do it right, pretty  much on any CMS I've worked with.  The time-consuming part is not moving the CMS:
the problem is migrating all the content, which invariably contains absolute URLs.  the searchreplacedb script (and being handy with your editor of
choice) helps a bit.  But any database changes are non-trivial, if only because they are dangerous.  I think of it as disarming a bomb.  Sure, clipping the blue wire takes about as much time as executing the search-and-replace. But getting there requires planning.

So what's my process?  I backup twice, think for a long time, and search-and-replace in the database.  If I started the site and there are no complications, I keep it simple: from dev.domain.com to www.domain.com is a much simpler operation.  As I said, I never assume that there are no absolute URLs, regardless of CMS.

mickey


-- 

Mickey Panayiotakis
Managing Partner
800.270.5170 x512
 <http://www.infamia.com>
_______________________________________________
wp-hackers mailing list
wp-hackers at lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers


More information about the wp-hackers mailing list