• Resolved Jonas Grumby

    (@ss_minnow)


    This might seem like a dumb question to some of you, but can I export WP data and manage it w/ a program like MS Access then import it back in?

    The specific example is that I have a client who is changing the name of his company (adding a partner) and I have to replace every occurrence of the old name or acronym with the new info.

    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • I did something like that a year ago, but probably wouldn’t do it like that again.

    Last year, I took a backup of the relevant MySQL table(s). Which creates, among other things, a bunch of SQL INSERT statements to re-create every row of the table(s). For straight search/replace, I used NotePad++ (Open Source text editor). For more complex changes, I wrote a program (in Regina REXX — please don’t laugh). Once I was happy, I restored the table(s) using the modified INSERT statements. Obviously, to avoid outages, I perfected the process over several weeks, then actually repeated it in 15-20 minutes to minimize the outage.

    If I were to do it again, and only had to do straight search/replace, I would use the functionality built into MySQL. You can code SQL (an UPDATE statement, I believe) that will do search and replace of a table column (field) for all rows of a table. The gateway to MySQL documentation is here: http://dev.mysql.com/doc/

    To put this all in context to your original question, I used Microsoft Access for nearly a decade, but, to quote an old Perry Mason episode, “I wouldn’t trust it as far as I could throw a horse.” On data, that is. I’d just be too scared that some oddball character in a post would get corrupted/changed during import or export from MS Access.

    Thread Starter Jonas Grumby

    (@ss_minnow)

    Thanks Adiant. In the past I have updated Dbase tables w/ Access w/o any problems, but never SQL tables. The big caveat about the dbase tables was always to download them from the server and open them directly; and not use any import/export features in Access or the web site sofware.

    Thanks for the advice about using MySQL though because that should work nicely. I’ll test it on a dev site of course.

    Thread Starter Jonas Grumby

    (@ss_minnow)

    I have installed the search-and-replace plugin per the advice of Michael (moderator) and although it is too late for the site in question it does look like it would have done exactly what I wanted. I will keep it in mind for the future.

    Yes, I learned something, too, having not previously been aware of that plug-in.

    Thread Starter Jonas Grumby

    (@ss_minnow)

    Yes, it works very well. In a perfect world I would like it to give me back some info about which pages or posts it changed. It’s easy to end up changing things that you didn’t intend to with a plugin like this. All I’m saying is be very specific about what kinds of strings you are looking to replace, especially if you use it to make on-page code adjustments. Hopefully your code is standardized enough that you can avoid unknowingly replacing the wrong things.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘offline data management’ is closed to new replies.