[wp-hackers] shortcode for images?

Gaarai gaarai at gaarai.com
Fri Jan 30 13:36:53 GMT 2009

That's exactly my point Otto. There isn't a way to migrate an existing 
installation; rather, there is only a way to migrate the base data of an 

The current migration solution is:

   1. Export the data from the current site.
   2. Create a new database on the current/new host.
   3. Upload a fresh set of files from .org.
   4. Run the install.
   5. Import the data from the old site.
   6. Copy all the themes and plugins from the old site to the new site.
   7. Activate and configure the desired theme.
   8. Activate and configure the desired plugins.

I really don't see why all of this is necessary. Set 5 is especially 
problematic. What if the installation resides in a local-access only 
location? There is no way for the existing migration solution to enable 
a successful migration without recreating potentially large amounts of 
attachments and adding them into the relevant posts.

I don't know why there can't be support for an "advanced" migration 
solution for those that have the technical ability:

   1. Duplicate site contents to new location.
   2. Export SQL file of existing WordPress database.
   3. Create a new database on the current/new host.
   4. Import the SQL file to the new database.
   5. Modify the wp-config.php file if necessary.
   6. Load the site admin interface which would run the migration
      process, if necessary.

This may be complicated for some, but for those that know how to execute 
this process, it could potentially save hours or days spent migrating data.

The new process also has the side-effect of assisting in situations 
where someone may wish to modify their siteurl and/or home settings. 
With the current lack of automatic data migration handling, modifying 
these settings in specific ways can cause all of the attachments to be lost.

In this scenario, the method that WordPress would use to identify this 
migration is unclear. I am uncertain exactly how to do this as I have 
not read through the code while thinking of this scenario. However, a 
quick idea of how it might be able to work is as follows:

   1. When the admin interface is loaded (logging into /wp-admin/), a
      table of known ABSPATH, siteurl, and home values can be checked
      against the current ABSPATH and URL structure used to access the
      admin page.
   2. If a change has occurred and the user has administrator
      privileges, ask the user if they wish for WordPress to run its
      data migration process. The option for no should include a way for
      the user to indicate that they do not wish to be asked again.

There should also be an option to manually run the migration process. 
This allows the user to initiate the migration in the event that the 
automation process fails to recognize the change or to bypass a flag set 
in the database where the user isn't notified about the change.

I know that much of this isn't technically necessary, but the current 
lack of support for a true migration of an existing installation can 
prove to be a stumbling block for many.

Chris Jean

Otto wrote:
> On Thu, Jan 29, 2009 at 2:59 PM, Chris Jean <gaarai at gaarai.com> wrote:
>> The problem isn't that the format that image references are stored in when
>> added to post content is poor. The problem is that WordPress installations
>> as a whole don't transfer well.
>> 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.
>> This type of solution doesn't impact the performance of the core in any way
>> while still enabling simple migrations of site data.
> The existing Export/Import works "okay". Not great, but okay. It will
> handle the image transfers *if* the old site that you're migrating
> from is still around and accessible, because it can pull the images
> from the old site directly.
> Perhaps some sort of export solution that puts the images into the
> export data itself would mitigate the issues with it.
> _______________________________________________
> 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