Reading Time: 5 minutes
I have departed X as a social space like so many others. You will still find my handle on there but it’s not somewhere I linger. My brother’s ordeal in Russia meant I used that account for a lot of public advocacy and I’m worried that, if I yield it, it will be taken up by someone aligned with Russia or other dark forces. Twitter, though, was built on the content of its participants. The social media business model is built on this sort of extractive relationship but, at heart, you still are the creator of your posts. When I stopped interacting there, I downloaded my archive using Twitter’s data tool. Now what?
The archive is a compressed zip archive file. To view its contents, you can just unzip it. On Windows, right click on the file and select “Extract All” to open it up and place it in a folder. It is a bunch of web files, html and javascript, that you can navigate with a web browser. If you wanted, you could upload them to a website to display them. That was my initial hope.
Unfortunately, it is a snapshot of your entire account. It contains your direct messages, it contains your recovery email address and phone number and other personally identifiable information. I didn’t really want any of that published. I spent a couple of hours poking through the mass of javascript files to try to find out where this data was stored and presented. I hoped to just disable the links or delete the files that had the content. I was not worried about creating some dead end, 404-type experiences, so long as the primary tweets were accessible.
No luck. I shelved the idea but it was simmering on a back burner. As I’ve posted before, I think it’s important to own your own stuff. You cannot rely on a publisher maintaining access to your publications or information. They may go out of business, they may close their garden more than it was when you started posting there, they may suspend your account for reasons you are not able to overcome.
It’s not easy, though. Unless you are publishing first or simultaneously on your own site, you may be subject to the whims of tech bros and publishing hegemons. If you are on a site like Twitter, where your creativity is merged into a maelstrom of other content, it may be hard to extract your content in a way that you can reuse it.
This was the position I found myself in. My limited technical skills did not offer a solution to isolate just the tweets I wanted to display. Fortunately, I was one of millions who departed the X platform and some of those technical folks were worrying at this same problem.
Reformulate Your Archive
I eventually stumbled upon Darius Kazemi’s website where he had solved the problem in exactly the way I wanted. He had created a solution where you presented your Twitter archive and it converted it into a web-presentable format of just the tweets. I liked that he also had a referral to another developer who had figured out a way for folks to self-host via Github. But I’ll let you explore that on your own.
I grabbed my Twitter archive file (just the original zip file, if you have extracted it) and used the file picker on his website. As he explains, this does not upload your archive to his site. The work happens on your computer, allowing me to avoid the very point of not pushing my public information and DMs to the web.
Immediately I ran into an error. Fortunately, it was one that he had identified. You might want to take these steps before you even start, since it seems a consistent outcome although he may update the tool. If you have not already extracted all of the files in your archive, do that now. Then move the “tweets_media” folder out of the extracted files. Click on it, CTRL-X to cut it, and navigate to anywhere else on your computer (even your Desktop). Then paste the folder to save it for a later step.
Now go back to the place you extracted your Twitter files and select the top level files—in my case, this was an assets folder, a data folder, and a Your Archive.html file—and right-click with all of them selected. Choose “Compress to” and choose a zip file format. This will create a new zip file that you can drop into Darius’ file picker (it doesn’t matter what you call the zip file, but probably don’t call it the same as your Twitter archive at this point).
Once Darius’ tool was finished, I had a new zip file. I extracted it to a new location. Now you can return to wherever you dropped the “tweets_media” folder and bring it back into your archive. As he says on his website, navigate into the folder that has your handle (mine was davidpwhelan) and put the tweets_media folder inside that folder.

That’s it. I was able to FTP those extracted folders and files up to my website and I was done. His form asks you where you’re going to publish them, so think about this before you process your archive. I had already created a Twitter folder on my site, so I already knew where I was going to put it. I wanted the URL to be clear about what was at the destination, so mine are visible at:
Tidy Up
I immediately got an error message when I tried to access the URL but I knew it was a me problem. In my case, it had to do with how my website was configured for access. Darius’ tool creates an index.html file. Normally, that is a default file so that, if you type in a URL with a folder name in it and no file specified, an index.html file will be the file that opens. But I don’t use .html files as a default file; I use index.php.
This was an easy fix. I opened up the index.html file that was in my extracted archive from Darius’ tool. I added a bit of PHP code at the top:
<?php
?>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>@davidpwhelan Twitter archive</title>
...
<script src="https://cdn.jsdelivr.net/gh/nextapps-de/flexsearch@0.7.31/dist/flexsearch.bundle.js"></script>
<script src="app.js"></script>
<?php
?>
and repeated it at the very bottom. Otherwise, I left all of the HTML in the middle. I also customized some of the text between the <p> paragraph tags.
Then I saved it as index.php. When I uploaded that file to my site and tried the URL without a file name (so https://ofaolain.com/twitter/ instead of https://ofaolain.com/twitter/index.php), it worked fine.

If you still get an error, you may need to look at the .htaccess file in your root folder. Mine is already set to
DirectoryIndex index.php
And that will trickle down into the subfolders—like /twitter—without having to add a file. If you’re on a WordPress site, you probably already have this set to index.php.
The converted archive also creates a /Status folder with each extracted tweet. I ran into the security error again here, because each individual tweet uses index.thml to present it. I dropped a new .htaccess into the /Status folder with a single line:
DirectoryIndex index.html
I really like this feature. It means that, if someone wanted to, they could deep link to an individual tweet. If you are looking at the Browse tab or a completed Search, you’ll see that each tweet has a link -titled link that works like the old date/time link on tweets on Twitter.
I’m not a huge fan of dark mode so I will re-theme the look and feel of the Twitter archive. But it’s now 100% within my control so I can theme it however I like. It’s just Cascading Style Sheets.
I have noticed that the archive does not contain all of my tweets in it. I have not figured out whether this has to do with with Darius’ tool or if it’s the way it came from X. And since I have bulldozed a bunch of the tweets on my X profile using Redact.Dev’s mass deletion tool, I can’t be entirely sure. Either way, I have a more complete archive of my content than I think X has or, at the moment, presents.
Most of what I posted on Twitter was inconsequential. But it was a highly visible point of advocacy once my brother was held hostage by Russia. If for no other reason, I am glad that I have a record of that, a record that can outlast the will of people who do not care about information or freedom or freedom of information.
Update: After writing this post, I ran a second Twitter archive through the process. Same error, same fix. Worked great. The @FreePaulWhelan tweets are now all up too. I also learned that I can just leave the index.html alone and drop the .htaccess in the root folder for the archive.