rich menga books search contact

***Secret FSR Fender guitars? Yes, they exist, and they're right here

Amazon links are affiliated. Learn more.

wordpress export troubles

Situation: I want to move my blog back to And yes, I seriously want to do this. After thinking about it lot, I was most comfortable having my blog at that domain; it just feels like the right thing to do.

Bonus: I have a way of moving the blog where it would redirect everything easily. I already know how to do this and no one would "lose" anything. I tested a redirect setup, and with a little PHP magic it all works.

So what's the problem?

Well there's no other way than to describe it in super-nerdy fashion, so here goes.

The plan was to do this:

  1. Export everything as a single WXR file.
  2. Import everything to a new WordPress blog on
  3. Reinstall all plugins.
  4. Import the template.
  5. Set up the redirect.

And yeah, it was supposed to be that easy.

The snag I encountered is that the new WordPress absolutely will not import everything from the WXR and I have no idea why. The import process gets "stuck" at a certain point and will not complete.

Things I've tried:

  1. Inspect the WXR manually in a text editor. Everything checks out. There's nothing wrong with it.
  2. Try the import process again. Didn't work. It keeps "sticking" at the same spot.

For the life of me I absolutely cannot figure out what is going on with it.

In the end what I'll have to do is "break up" the WXR file. The file is roughly 5.5MB in size which is well under the 8MB import limit in WP, but even so I'll have to manually split the file.

In short, this is going to be a pain in the ass.

Quick questions answered (because I know some WP authors/admins would ask these):

Q: Why not just manually export the MySQL database and import to a new one?

A: I could do that. The problem is that there's a bunch of crap in there pointing to the old domain. In addition there are plugins which may have domain-specific settings. What this means is that I basically have to do the same thing I would be doing with the WXR file, that being open it with a text editor, "fix" stuff and then send to a new MySQL db. But then there's the added problem of not knowing whether it would work correctly or not. At least with manually editing a WXR file it's more or less guaranteed to work, whereas the MySQL way wouldn't be.

Q: Why not just uninstall all your plugins and then do a MySQL db export?

A: Many plugins for WordPress create tables in the MySQL database. If you uninstall (as in "deactivate" and physically remove via FTP), the tables will still be there. This is a huge problem with the way plugin authors do plugins for WP. If I'm going to move the content over to a new blog, I want to reinstall all plugins from scratch so I don't have any needless tables in the db.

A classic example of this is Podpress, a popular WP plugin. If you install it, then uninstall it, check your MySQL database. You'll find now-useless podpress specific tables in there and there's not a frickin' thing you can do about it save for manually removing them via phpMyAdmin.

Granted, having extra tables in the WP database won't "hurt" its operation but it's better to start off with a fresh db and reinstall the plugins so they all point to the right domain.

. . .

And now The Big Question answered for existing WordPress authors:

How does one break up a big WordPress WXR file into smaller ones?

There is no automatic way to do this so you have to do it manually, but it's actually fairly easy.

First I strongly recommend getting a text editor that can handle really large text files. I use Notepad++. It's free. Windows Notepad cannot handle super-large text files (and never really could).

I will assume you're using Notepad++, which by the way has tab support (very slick).

Open up the big honkin' WXR file, then open up a new blank tab so you have both the WXR file and the blank file open at the same time side-by-side. You can switch back and forth between the two easily this way when you copy/paste stuff. And trust me, you'll need to.

You need to copy the top of the WXR file until the first instance of <item>. You copy everything above <item> into the new blank text file. Depending on how your WordPress is set up, the first instance of <item> will be somewhere between line 35 and 55. Notepad++ has line numbers on the left and they're easy to spot.

You need to copy two lines from the end of the WXR file. This is easy; copy the last two lines which are </channel> and </rss>. Paste these at the end of the new text file you created.

Create a few more blank files as tabs in Notepad++. Copy and paste everything from the newly created file (not the WXR) and paste into each new tab. If you have a really really big honkin' WXR, create at least 4 new files.

Every post and page in the WXR file starts with <item> and ends with </item> (note the slash).

Go to the top of the WXR file and find the first instance of <item>. Start from there, highlight about roughly 30,000 lines and stop at an instance of </item>. Cut this text, go to one of the new tabs you created and paste it before </channel> (the second to last line).

Go back to the WXR file, start with <item> again, highlight another 30,000 lines ending at an instance of </item>, cut that, paste it in your second newly created file. Repeat process for the third file, fourth, fifth if needed, etc. You get the idea.

Save the first newly created file as 1.xml, the second as 2.xml, the third as 3.xml and so on.

You'll then be able to import every file into a new WordPress installation as the sizes are much smaller and easier to manage.

. . .

To note, the only reason I'm having to do this is because I'm forced to due to the fact the import process screws up.



Best ZOOM R8 tutorial book
highly rated, get recording quick!

***Guitar deals & steals? Where? Right here. Price drops, B-stock and tons more.
🔥 Popular Articles 🔥
Why I don't like PRS guitars
Why I don't like PRS guitars
There are certain guitar companies out there who have very little concerning a guitar I'd actually want to own, and PRS is one of them.
Casio F-91W
Casio F-91W cheat sheet
A quick guide on how to set the time, date and a few other tips and tricks.
Orient Tristar
EMF radiation danger in quartz watches - time to switch to automatic?
Did you know that quartz battery powered wristwatches emit radiation?
Fender Player Sonic Red
The reason for the skunk stripe on Fender necks with rosewood boards
An oddity is that even though a separate piece of wood for the fingerboard exists, there is still what's known as a "skunk stripe" on the back of the neck.
Garmin Drive 52
Older Garmin models worth getting (updated 2022 edition)
This is a list of the best older Garmin GPS models worth getting
Casio MTP-1370D
Casio MTP-1370D, the poor man's Rolex Day-Date
The Casio MTP-1370D is the cheapest way to get a Rolex Day-Date look
⭐ Recent Articles ⭐
Jackson JS11 Dinky
Jackson JS11 Dinky, the ultimate project guitar?
When it comes to ready-to-mod guitars, it doesn't get much better than this.
Gibson L6-S, a Norlin era beast from the 1970s
Oh, no... not another Norlin era Gibson.
1960 Fender Musicmaster
Fender Musicmaster might be the ultimate retirement guitar
It's real-deal Fender vintage, it's available, and there's one other rather nice advantage to owning one of these.
Gretsch G2655T Streamliner Brownstone Maple
The easiest Bigsby? Gretsch G2655T Streamliner
When you want a Bigsby vibrato on a genuinely well-built guitar for not a lot of money, you go Gretsch.
Epiphone Les Paul Standard 60s Bourbon Burst
Almost perfect, Epiphone Les Paul Standard '60s Bourbon Burst
There is a whole lot of wow to this Les Paul.
Squier 40th Anniversary Jazzmaster Gold Edition
Classic or tacky? Squier 40th Anniversary Jazzmaster Gold Edition
Is this a classic, or is it tacky? Let's talk about that.