[wp-testers] Absolute URLs hard-coded on database

Leo germani leogermani at gmail.com
Thu Mar 19 14:51:34 GMT 2009


lets try to move it forward.

I still beleive its better not to store absolute paths and urls. I dont
think it will have great imact on performance... but, lets think of an
alternative:

I saw this good suggestion for the issue (by Chris Jean):

So, I propose that some sort of transfer mechanism be added to the core
of WordPress. This transfer mechanism will intelligently handle updating
all data in the database that needs to be updated when the siteurl
and/or home are modified. In addition, an action is fired before and
after this data transfer occurs so that plugins can do any necessary
changes as well.


I think this is not a plugin, but core.

The problem is I would never be able to run this script through the admin
interface, because once I moved my database to a different server, I will
not be able to login...

What we could do is: in the admin area we allways check to see wether we are
in the same host as set in the siteurl option. If its not we have access to
a page where we could confirm the admin password and run the script.

Leo,,

still in hope to get support from core developers to get this changed


On Wed, Mar 18, 2009 at 12:27 PM, Stephen Rider
<wp-hackers at striderweb.com>wrote:

> At the least, perhaps a "Move this site" plugin is in order....
>
> On Mar 18, 2009, at 10:17 AM, Leo germani wrote:
>
>  Im referring to the site_ur and home options on the options table, as well
>> as all the guid fields for all the attachments, the links to all the
>> images
>> inside all the posts, and other options that also store hard-coded full
>> URLs...
>>
>> this is specially bad when moving the site from a test server to
>> production,
>> for instance...
>>
>> On Wed, Mar 18, 2009 at 11:49 AM, Xavier Borderie <xavier at borderie.net
>> >wrote:
>>
>>  Isn't it due to this effort?
>>> http://markjaquith.wordpress.com/2007/09/25/wordpress-23-canonical-urls/
>>>
>>> 2009/3/18 Leo germani <leogermani at gmail.com>
>>>
>>>  I wonder if Im the only one here that gets annoyed with the amount of
>>>> absolute URLs and paths that are hardcoded in the wordpress database.
>>>>
>>>> Is there anybody out there who is also unhappy with this and is there
>>>> any
>>>> effort to get rid of this? Id love to help on this refactor...
>>>>
>>>
> _______________________________________________
> wp-testers mailing list
> wp-testers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-testers
>



-- 
leogermani.pirex.com.br
leogermani.estudiolivre.org


More information about the wp-testers mailing list