Almost does the trick, I guess that would work if the database were much smaller, but with this tool you still have to know which tables to change. It’s the same thing as going into phpMyAdmin and selecting all the tables you need to export. I tried doing that and after an hour digging through the database I decided to ditch that, way too time consuming.
What I really need is a search and replace function without knowing which tables need to be updated, that would be the most efficient way. After searching the database for the IP address, there are about 100 tables that need to be updated, with 1652 instances of the URL.. With that tool you still need to click through and select each table, and what if I miss something through human error…
I was hoping to do a search and replace. I know how to search, I just don’t know how to replace that string.
With the multisite, each table starts with a different number, each number assigned to the network site, so for instance, wp_105_options, wp_105_posts and there are a few extra tables in each network site that are associated with plugins we have installed. It’s insanity!
I could go through the database and select all the tables that need to be updated based on the search results, export those tables, updated them, and then import again. But that’s the long way, I’m sure. It may be the only way though, for someone that doesn’t know mysql inside and out, I guess.
(I also have to do the same thing to change the admin’s email address, which stinks!)
I just found a script that doesn’t require the tables to be selected, and it works great in case anyone else needs it:
http://sewmyheadon.com/2009/mysql-search-replace-tool/
I just ran it through a test site and it works great. All you need is the database username and password, you don’t select any tables, it searches all the tables in the database for you.
🙂
The reason I don’t suggest that one is I’m not 100% sure it handles the data serialization as the other does.
That’s the dilemma really. I have over 100 tables to change… 1652 instances in all.
You can select it to run on the whole DB, you know, the one we suggest 🙂 Just select all tables.
I’m going to give it a try, thanks! (BTW, are you sure it won’t time out on a huge site?)
Hard to say. It’s pretty fast for a PHP script editing DBs. You could always export your DB and run it all locally, then upload the DB back to your server, but it’s all a function of memory.
I might actually go so far as to put up a .maintenance file to take my sites ‘down’ for maintenance.
Well I tried that search and replace tool from interconnectit.com and it didn’t work for changing an email address throughout the multisite database.
In phpMyAdmin it showed 454 matches for the email address, and after running the search and replace tool from the Codex, it only changed 69 instances so phpMyAdmin still shows 385 instances unchanged.
I haven’t run it for the URL yet, I’m afraid it’s not going to work properly.
Are you sure you selected all the tables to run it through?
Yes. Anyway I’m just uploading the dataabase with the URL updates, in pieces (because it’s too large). Been at it for hours now… Hope it works!