[wp-hackers] Will upgrading 1.2 DB to 1.3 break it for 1.2?
Nick Parker
nickbp at gmail.com
Sat Oct 16 23:22:30 UTC 2004
Arthur Jennings wrote:
> On Sat, 16 Oct 2004 13:34:29 -0400, Nick Parker <nickbp at gmail.com> wrote:
>
>>In moving my site to 1.3, I made a duplicate of the database except with
>>a different prefix (in my case, I had "wp_" and "wp13_") and then
>>installed 1.3 in a separate directory from 1.2.
>>
>
>
> That sounds like a good plan. How do you do that?
>
There's probably an easier way to go about doing this, but this is how I
did it using phpMyAdmin:
- Go into your Wordpress database in phpMyAdmin, by selecting it from
the pulldown menu in the left column.
- Select the "Export" tab at the top of the page that loads up.
- Make sure there's a checkmark in the box for "Save as file", then
click Go.
- You will then be sent a .sql text file that contains all the data from
your wordpress database (this is also a useful way to create backups of
your data).
- Load the .sql into a text editor (Avoid Word or other editors that
will corrupt the file).
- Perform a mass-replace inside the .sql file, replacing your current
prefix (in my case, I started out with "wp_") with your new prefix (I
chose "wp_13a4_") Note that this could potentially edit any of your
content should you just happen to have entered "wp_" in them at some
point, as the text editor isn't choosy about what it changes.
- After saving the file, go back to the browser window with phpMyAdmin
loaded, and click on the SQL tab.
- Pick the .sql file that you just edited, and click "Go".
You will now have two copies of your wordpress data, with separate
prefixes for each. You can give 1.3a4 the new prefix and it will
completely ignore the old one. By doing this, you've effectively
isolated two copies of your data from each other, so any edits to your
content would have to be done twice if you want them to be reflected in
both 1.2 and 1.3.
There is probably a more straightforward way to go about doing this, but
that's the method that I used. Note that a working copy of phpMyAdmin
is needed for my particular example, but if you have some other method
of getting backup data from your database, that can work too.
Have fun!
--
Nick Parker: http://beoba.net
http://getfirefox.com - Because Internet Explorer gives you popups and
viruses.
More information about the hackers
mailing list