how to fix wordpress when changing the site url breaks your site

I first went online in 1995 and have posting things online ever since, first on a personal website (with a tilde in the url!) on my internet provider’s domain and then a blog in 1999 on the now-defunct cheesedip.com (runnning first on Blogger and then Movable Type) and then from 2002 on the now-defunct lliiaa.com (Movable Type). So I’ve got two and a half decades of using blogging software personally—plusa handful of years of both front and back backend work on Movable Type and WordPress sites professionally—and I can’t honestly remember the last time I was as fucking annoyed to have a super basic option a CMS go wrong and be unfixable for no apparent reason as I was last night, when I changed this site’s site url in the process of going live and then had it just not work no matter what. Even going in through phpMyAdmin to edit the database directly didn’t work and I was ready to tear hair out (not mine, but that of WordPress engineers cause something this simple really should just work).

If you’ve arrived here because you did the same thing, you probably already have at least a few other tabs open from the same search that brought you here. I tried all those things, none of them worked for me and they were also all kinda time consuming besides. Here’s what I ended up doing which is also what I think is the most elegant solution to the problem as long as you have access to phpMyAdmin through your hosting provider.

  1. Go to Tools -> Export, and then export your content. I only needed to export posts, but choose the combination that makes sense for your site.
  2. Open your copy of wp-config.php and note the values it saved during your installation process for the following variables: db_name, db_user, db_password, db_host
  3. Using phpMyAdmin, access your WP install and click on your db_name in the panel on the left, so the tables listed underneath it appear on the right.
  4. Select all twelve tables; underneath them there will should be a drop-down with a handful of options. Select drop and on the next page, you’ll be asked “do you really want to execute the following query?” If you say yes, you’ll be wiping your current WP database—but that’s what we want, and we backed up your content in the first step, so say yes. And now we’re done with phpMyAdmin.
  5. I moved my WP install so it now lives in the same root folder as this blog, but YMMV. Wherever is, access wp-login.php through your browser and reinstall your blog with the values you saved from wp-config.php in our second step.
  6. Go to Tools -> Import, and then import the content we exported in step one.

Et voilà, you should now have a working blog at the url of your choice again. Which you should’ve had all along, but hey, WordPress!

Thanks to Matt Haughey for inspiring me to write this post by always putting together tutorials to save people from having to problem solve things he’s already thoroughly researched and fixed!

p.s. If you found this useful,

hannibal

Every once in a while, when I’m a little down, I remember that the tabloid press in Hannibal refers to him and Will Graham as “murder husbands” and I lol myself back to life.

Also good for reviving lols: remembering how Will and Bedelia du Maurier are so incredibly jealous of one another later on in S3 over the affections of someone whom they both know *plans to eventually eat them* that they can’t stop sniping at each other. What fucking weirdos!

I mean, imagine having an incredibly hot boyfriend who is always impeccably dressed, cooks a gourmet meal at least once a day every day, and amazing in the sack, but also likes to remind you from time to time—and not very subtly—that one day he’s going to not only eat you, but maybe even slowly feed you to yourself. Still hot?



There’s this great scene earlier in the season from when Hannibal and Bedelia are masquerading as a married couple in Italy and they have someone over for a dinner party.

Hannibal being Hannibal, there’s an exquisite feast on the table, but he’s also made a special dish just for Bedelia. Their guest points out jokingly that what she’s eating—oysters, acorns, and marsala—is what the Romans fed cattle in order to improve their flavor. Bedelia replies that her husband has a sophisticated palate and

bedelia-how i taste.gif

Every time I think about this I die and am resurrected again by how this is the best oral sex joke of all time, that’s also possibly the best cannibalism joke on a show three seasons long that has a handful of them on every single episode.


I love Hannibal so much and how Bryan Fuller and his crew use Gillian Anderson in it, quite possibly the best use of her on anything she’s ever been in since the middle seasons of The X-Files—and I say this as a massive fan of The Fall. The Italian section of S3 is shot even more lushly than the preceding seasons, in its choice of costumes just as much as its sets, and what better visual backdrop is there for a woman who has always looked straight out of a John Singer Sargent portrait, especially when she’s mysterious, withholding, and married to the devil himself.

Bless Fuller for delighting in giving Anderson the most improbably long, dense pieces of dialogue, because it’s so satisfying to watch her work her way through them—very few actors could ever even manage them, especially on TV, and her scenes in this season are a joy and a gift.

If I had my way, Fuller would be writing an episode of X-Files S11! (And Chris Carter would be writing none!)

thanksgiving, in a nutshell

2/3rds of me is from people colonized for 33 years by the other 1/3rd of me, and then another 48 by the US after that, plus I really don’t like turkey very much, so other than the time I was cast as a pilgrim in Mrs Nelson’s kindergarten class for Saint Peter School’s Thanksgiving pageant, I’ve never really cared much about Thanksgiving. This tweet I saw yesterday captures my sentiment perfectly:

to boldly go where no one has gone before

I can’t even begin to tell you how much I love that the Museum of Natural History astrophysicist/everyone’s nerd crush Neil deGrasse Tyson (@neiltyson) has been exchanging tweets with the NASA’s Curiosity rover (@MarsCuriosity) on the eve of its historical touchdown on Mars. Seriously, you guys, this thing makes it clear that English just doesn’t have enough synonyms for delight.


More on Curiosity from CNET: Curiosity closes in on Mars for high-stakes descent.

you don’t refuse to breath do you

From Lunch Poems, by Frank O’Hara:

Song (Is it dirty)

Is it dirty
does it look dirty
that’s what you think of in the city

does it just seem dirty
that’s what you think of in the city
you don’t refuse to breathe do you

someone comes along with a very bad character
he seems attractive. is he really. yes very
he’s attractive as his character is bad. is it. yes

that’s what you think of in the city
run your finger along your no-moss mind
that’s not a thought that’s soot

and you take a lot of dirt off someone
is the character less bad. no. it improves constantly
you don’t refuse to breathe do you

Going to read this poem to myself every day for the next week or so as a meditation.
[ via Brain Pickings ]

alfred hitchcock’s elevator story

Pretty much every single paragraph of director Peter Bogdanovich’s 1999 New York Times piece on his friend Alfred Hitchcock is gold, but this one is platinum:

My own favorite memory of Hitchcock comes from an incident at the St. Regis Hotel in New York in 1964. After some frozen daiquiris had left me a bit tipsy and Hitch quite red-faced and cheerful, we got on the elevator at the 25th floor and rode in silence to the 19th, where, when three people dressed for the evening entered, he suddenly turned to me and said, ”Well, it was quite shocking, I must say there was blood everywhere!” I was confused, thinking that because of the daiquiris I’d missed something, but he just went right on: ”There was a stream of blood coming from his ear and another from his mouth.” Of course, everyone in the elevator had recognized him but no one looked over. Two more people from the 19th floor entered as he continued: ”Of course, there was a huge pool of blood on the floor and his clothes were splattered with it. Oh! It was a horrible mess. Well, you can imagine . . . ” It felt as if no one in the elevator, including me, was breathing. He now glanced at me, I nodded dumbly, and he resumed: ”Blood all around! Well, I looked at the poor fellow and I said, ‘Good God, man, what’s happened to you?” And then, just as the elevator doors opened onto the lobby, Hitchcock said, ”And do you know what he told me?” and paused. With reluctance, the passengers now all moved out of the elevator and looked anxiously at the director as we passed them in silence. After a few foggy moments, I asked, ”So what did he say?” And Hitch smiled beatifically and answered, ”Oh, nothing — that’s just my elevator story.”

http://www.moma.org/interactives/exhibitions/1999/hitchcock/overview.html
http://www.moma.org/interactives/exhibitions/1999/hitchcock/interview/index.html

use that energy!

Norwegian crime writer Jo Nesbø, on striking while the iron is hot:

When you write, it’s important to do it while you have the enthusiasm for the idea. Maybe the most important period of your writing is when you are convinced that your idea is the best idea any writer ever has had. So you have to use that energy, because the time will come when you wake up in the morning and you will doubt your idea. And then it’s good that you have already more than half–

I write better long form pieces if I’ve sat on them for a while to think the core ideas through, but for other projects this is completely spot on to me—I need to get better at making time to sit down and execute those kinds of projects (even if it’s just in rudimentary ways) instead of just jotting my ideas down and promptly forgetting about them.

critical feedback


Seeing this in my Twitter stream just now was a very helpful kick in the butt as I’ve been avoiding finishing an email for months now to a friend who’s asked me what I think about his first novel, for fear of being a dick.
I’m torn between being completely honest, as he’s asked me to be—and as friends and employers know to expect whenever they ask for my opinion on something—and knowing there’s nothing to be done about the things I disliked even if I convince him of my POV because it’s already printed and comes out soon. I loved the book, so why be a dick? His argument is it’ll be something to consider for the next novel, but my inner Admiral Ackbar says this is a trap. What to do?
[ via amishrobot ]