Migrating My WordPress Database from a Lightsail Instance to a Standalone Database

Last year, I moved this blog off of a EC2 instance running a too-old version of PHP to a Lightsail instance. I had to restart that instance in order to retrieve the images associated with all the prior posts so they looked exactly as they did before, but the end result was the same blog at a lower monthly cost. Since then, I installed and configured the WP Offload Media Lite plug-in to push all those images to an S3 bucket. Today I decided to move the WordPress database off the Lightsail instance to a standalone database.

Accomplishing this move required cobbling together instructions from Bitnami and AWS (and filling in any gaps with educated guesses). Here are the steps I took to get everything moved over, in the order I took them.

  1. Export the application database from the Lightsail instance. As of this writing, the Bitnami WordPress image still keeps database credentials in a bitnami_credentials file, so using that with the mysqldump command generated the file I would need to import to the new database (backup.sql).
  2. Download backup.sql to my local machine. Connecting to my Lightsail instance with sftp and my SSH key followed by “get backup.sql” pulled the file down.
  3. Download MySQL Workbench. Looking at these import instructions, I realized I didn’t have it installed.
  4. Create a Lightsail database. On the advice of co-workers who also do this with their side projects, I used us-east-2 as the region to setup in. I specified the database name to match the one in the backup.sql file to make things easier later when it was time to update wp_config.php.
  5. Enable data import mode. By default, data import mode is disabled and public mode is disabled. So I turned on data import mode and was puzzled for a second when I couldn’t connect to the database in order to import from backup.sql.
  6. Enable public mode. With public mode disabled, and my backup.sql file (and tools to import it) not already available in a us-east-2 hosted instance or other resource, I couldn’t load the backup data. Once I enabled public mode, I was able to use MySQL Workbench to connect and upload the data.
  7. Disable public mode.
  8. Update wp_config.php to use new database credentials.

To confirm that the post you’re reading now was written to the new database, I turned on the general query log functionality on the database instance to ensure that the server was writing to it. Having confirmed that, I turned off the general query log.

The additional cost of a standalone Lightsail database is worth it for the week’s worth of database backups you get with zero additional effort. Migrating to a newer WordPress instance in the future should be easier as well, now that both the database and media for the site are off-instance. The next step I need to take is upgrading from the lite version of WP Offload Media to the full one. This should offload all the media so I can safely remove it locally.

“I have no time for foolishness.”

The function, the very serious function of racism is distraction. It keeps you from doing your work. It keeps you explaining, over and over again, your reason for being. Somebody says you have no language and you spend twenty years proving that you do. Somebody says your head isn’t shaped properly so you have scientists working on the fact that it is. Somebody says you have no art, so you dredge that up. Somebody says you have no kingdoms, so you dredge that up. None of this is necessary. There will always be one more thing.

Toni Morrison

This is the quote that came to mind as I watched a clip of CNN’s Dana Bash asking the governor of my state, Wes Moore, about Republicans blaming diversity policies for the collapse of the Francis Scott Key Bridge. Governor Moore’s response to Bash’s initial question was the right one in my view, because he dismissed the Republican assertions as foolishness and talked about closure and comfort for the families of those killed in the accident, safety for first responders, re-opening the channel and port, and rebuilding the bridge. Bash persisted in asking the governor about the “DEI mayor” insult against Baltimore mayor Brandon Scott by someone from the blue check brigade on Twitter. Governor Moore’s response was similarly focused on Baltimore’s recovery from the accident, which he ended by saying “I’m focused on what matters right now.”

Unlike the poor journalism which animated my earlier complaint against the press coverage of the disaster (which leaves the racism of critics as subtext), Dana Bash’s line of questioning directly aids and abets racists and their critique by foregrounding it and asking the governor of the state to respond to it as if it is legitimate. There is of course no actual evidence that DEI had anything to do with a ship the size and the weight of a skyscraper plowing into the bridge and destroying it. So why would Dana Bash waste air time elevating the ignorant nonsense of GOP pols spewing racism on Twitter? My guess is that CNN wanted to appear “balanced”, but they failed at that in addition to wasting the governor’s time and that of their viewers. What does a Utah state representative have to say that could possibly be relevant to the issue at hand? As it turned out, absolutely nothing. What does a former member of the Florida House of Representatives have to say that could be relevant? Again, absolutely nothing. Remember–six people died as a result of this accident. As of this writing, some of the dead still have not been recovered. A key driver of economic vitality for the city and the state is now at risk. Dana Bash (and/or her producers) still chose to waste nearly two minutes of airtime on racist, conspiratorial nonsense from the fever swamps of Twitter.

Journalism isn’t economics, but opportunity cost is a useful lens through which to view the time spent on foolishness. The entire interview was just over seven minutes long, and most of the questions were good, prompting useful responses from Governor Moore. But about 20% of the interview time was taken up by GOP nonsense from Twitter. That’s time which could have been spent asking about potential future changes in policies and procedures for handling large cargo ships in the future. It could have been used to ask about the victims of the accident, who merited only a brief mention from Bash at the end of the interview. It could have been used for a deeper dive into the local economic impacts of the accident on the Port of Baltimore, and on the people who work there. Many port workers live in Dundalk, MD, a place that differs quite a bit demographically from what racists on Twitter seem to think.

Joy Reid’s interview with Mayor Scott, even while calling out the conspiracy theories around the accident as ridiculous, did surface the very same tweets from the fever swamp as Dana Bash did. Mayor Scott took the opportunity to respond to the racist assertions from Twitter, which is his right. But a large part of me wishes that he had followed the governor’s example and left the foolishness of the right-wing fever swamps to Black Twitter. Because if there’s anything Black Twitter does well, it’s turn insults on their head. Since DEI is the new n-word, here is a small sampling of what’s been done with it:

In my view, journalism continues to let social media be their assignment editor and set the agenda. Whether would-be centrists like CNN or NPR, or overtly left-leaning MSNBC, Twitter still figures far too prominently in their coverage and in their questions. Particularly when the owner of Twitter has made it his mission to platform Nazis and personally amplify the most offensive and extreme right-wing thoughts, integrating the worst output of such a platform into news coverage cannot help but make the news product worse, and less useful to us as citizens. Difficult as it is to find conservative perspectives on issues that are actually useful, the press needs to make the effort. Racist positions are not owed airtime simply because they are “the other side”. In researching this post, I found Ed O’Keefe of CBS’ Face the Nation did the same thing Dana Bash did when he interviewed Mayor Scott. Here’s a quote of O’Keefe’s question:

I’ve got to ask you one of the wilder things is some conservative critics blamed the bridge collapse on diversity, equity and inclusion policies in Maryland. Diversity, equity inclusion, better known as DEI to a lot of people. They called you, some critics, “the DEI mayor.” What did you make of that when you heard it?

Ed O’Keefe interviewing Mayor Brandon Scott on Face the Nation, March 31, 2024

To steal a line from President Mohamed Irfaan Ali of Guyana, “Let me stop you right there.” No, Ed O’Keefe, you don’t have to ask the mayor of Baltimore about conspiratorial nonsense from aspiring governors and congressmen from Utah and Florida just because they happen to be Republican. Not only do they not represent Baltimore, they would probably be lucky to be able to find the city on a map. They don’t have relevant expertise in shipping or ports or bridge-building or disaster response. Don’t be the journalist who makes a conversation worse by bringing voices to it that have nothing to add beyond ignorance and racism.

Now Sharing to the Fediverse, My Threads Account

When I checked in on my Threads account recently, I saw that the Fediverse sharing feature was available and turned it on.

As you can see above, I’ve added my Threads account in the last available metadata entry on my primary Fediverse account. In testing the new link before publishing this post, I found that Ivory desktop and mobile clients appear to rewrite the link to @genxjamerican (which doesn’t work). Clicking the Open in Browser button that comes up after the first failed site visit gives you another rewritten URL, https://www.threads.net/user/genxjamerican#. (which also doesn’t work). When I visit my profile in a browser however (at https://hachyderm.io/@genxjamerican), clicking the Threads link takes me directly to the profile as expected.

A search for my handle in the Ivory desktop client now shows my Threads account and my Mastodon account. Only time will tell whether or not the anti-Meta fedi pact I posted about last year has a meaningful impact on the growth of Threads in the fediverse. Meta could just as easily sabotage its own growth through strategic errors. One of the fediverse’s most consistent advocates and contributors, Dr. Jorge Caballero, makes a persuasive argument that paying for “good” Threads posts is one such mistake.

I haven’t really set up anything to cross-post the same content to multiple social media accounts beyond what Jetpack Social supports. My blog posts are automatically posted to Tumblr and to my Mastodon account. I might change that just to see how different the levels of engagement are. IFTTT is probably where I should look first, having set up a bunch of automations there in the past. So far, when it comes to sharing posts from this blog, followers on Mastodon engage far more often with them than in any other social media network where I have a presence.