Goodbye WordPress. Hello Astro!
For the TLDR edition, please read State of Static Blogs with Foreword by Mark .
Otherwiseā¦sit back and enjoy these next few minutes, and welcome to Goodbye WordPress. Hello Astro!
Goodbye WordPress š¤
Dear WordPress, since ā09 youāve been there for me like no other. Iāll always remember how this ecosystem got me into web development. Through MAMP/XAMPP (hi, XP), to mucking with header.php
and footer.php
to get styles or logic into a global context (probably wasnāt necessary), fracking CSS through child themes with !important
as unlimited ammo, to feasting on plugin after plugin like itās Thanksgiving, itās been pretty cool to see how this ecosystem has grown from Personal Home Page to what it is today.
The release of Gutenburg block editor, allowing REST APIs since 4.7, the advent of Local by Flywheel to simplify local development and the emergence of dedicated hosting providers like WP Engine are what kept me with you. Had none of those things occurred, I probably wouldāve flipped a table then regressed to FTPāing an index.html
file.
That said, itās time for me to go. But I wonāt leave you hanging with any doubt, whatsoever. It was honestly due to these 6 objectives.
Hello Astro š
I have no intention of repeating everything that appears on your personal home page. š
But yes, it was quite convincing. So I guess Iāll explain my why by way of a user story.
As Mark, I want a low-to-no-cost blogging system that I can work with quickly, so I can ship it to prod ASAP.
My Playbook š
This playbook is very specific. It works under the assumption that youāve chosen your theme and opted in to Netlify as your final destination.
1. Back That Thang Up
š¶ Cash Money Records, taking over for the ā99 into 2000ā¦
- Insurance policy (required) - Export your content from your WordPress Dashboard Tools > Export. This spits out an
.xml
file. - Insurance policy (optional) - If you have the luxury of WordPress dedicated hosting such as WP Engine, they have an automated backup feature. Download the latest zip file, just in case!
š¶ ā¦(nah, nah, nah, nah, nah)ā¦After you back it up, then stopā¦
2. Return of the Mack
š¶ Ooh-oh-oh, come onā¦Hey, yeah, ayā¦Well, I tried to tell you so (yes, I did)ā¦But I guess you didnāt knowā¦
- Itās time to come back from nothing. In this case, with wordpress-export-to-markdown to convert your WordPress contents to Markdown for consumption later down the road within your Astro theme.
- Take your
xml
file and rename it toexport.xml
per Willās suggestion and make life easier for yourself. Drop it like itās hot into the same directory that you run the script from.
npm install && node index.js
After running the command, the Node app should output a similar report of whatās saved.
š¶ ā¦You lied to meā¦All this pain you said Iād never feelā¦You lied to meā¦But I doā¦But I do, do, doā¦
3. Not Like Us
š¶ Wop, wop, wop, wop, wopā¦Iāma do my stuffā¦
182 posts.
Irrespective of volume, this is the next stop as we move the ball down field and depending on how old your posts are, special care is required.
- Take the contents of
/output
directory of wordpress-export-to-markdown and drag that over into your Astro themeās/blog
directory.
Drag contents of the output directory (e.g. post) into your themeās blog directory.
ā ļø DISCLAIMER: Take your time. Itās at this point where beauty is in the eye of the beholder (aka YOU). In my case, thatās 182 posts (I didnāt even talk about pages) circa 2013 onward. I needed to see how the old stuff drew to the screen before publishing. I had to double-check each article to ensure that the markdown and display was in an acceptable format (fixing broken iframes, centering things again, etc.). Also, not every piece of data is exported to markdown. Most noticeably Yoast SEO contents. It also meant getting scrappy with Photoshop again to make featured images because honestly, that wasnāt always a thing many many moons ago.
š¶ ā¦Are you my friend?ā¦Are we locked in?ā¦Then step this way, step that wayā¦Then step this way, step that wayā¦
4. Hypnotize
š¶ ā¦Uh, uh (uh, come on)ā¦Ha, sicker than your average, Poppa twist cabbage off instinctā¦Brothers donāt think stuff stinkā¦Pink gators, my Detroit playersā¦Timbs for my hooligans in Brooklyn (thatās right)ā¦
Iām not messing around with 182 posts, period. Time to redirect!
- If you have a few redirects, insights from Kedashaās URL Redirects is perfect.
- Otherwise, I went with Cassidyās setup using Netlify Redirects with Astro.
š¶ ā¦Biggie, Biggie, Biggie, canāt you see?ā¦Sometimes your words just hypnotize meā¦
5. The Next Episode
š¶ ā¦La-da-da-da-daā¦Itās the motherlovinā D-O-double-G (Snoop Dogg)ā¦La-da-da-da-daā¦You know Iām mobbinā with the D-R-Eā¦Yeah, yeah, yeahā¦You know whoās back up in this motherloverā¦
- This is arguably the most stressful part. No matter who controls your DNS setup, they all clap back with the āup to 24 hoursā disclaimer for DNS propagation. In my case, Delegate to Netlify was the route to take.
š¶ ā¦šØš± every dayā¦
Real-Time QA š§
š¶ ā¦What weāre gonna do right here is, go backā¦Way back, back into timeā¦
Letās test things outside of my control! Hereās your chance to QA links I canāt edit myself.
Steps to Reproduce - Issue 488
- Visit JavaScript Weekly Issue 488
- Click article, The Tale of Upgrading a Legacy Angular App
- Astro x Netlify x MarkLReyes.com ā
Steps to Reproduce - Issue 517
- Visit JavaScript Weekly Issue 517
- Click article, Reading John Resigās āPro JavaScript Techniquesā 14 Years Later
- Astro x Netlify x MarkLReyes.com ā
š¶ ā¦If you take your love away from meā¦Iāll go crazy, crazy, crazy insaneā¦If you take your love away from meā¦Iāll go crazy, Iāll go insane (oh)ā¦
Mahalo and Aloha š¤š¾
š¶ ā¦I was young and didnāt have nowhere to runā¦I needed to wake up and see whatās in front of meā¦There has to be a better wayā¦
I was able to retire Cloudflare, WP Engine (saved š°) and WordPress safely upon change. That said, those aforementioned technologies are still very good but this domain needs something else.
Fun Facts
- Start date of project: March 13, 2025
- End date of project: March 17, 2025
- Over time, the subset of pages exported were no longer applicable. The About Page was really the only thing valid at the time of this project.
- AI was used once. Specifically in VS Code with my GitHub CoPilot extension generating suggestions when using the existing Authors Card Component as my source of inspo.
Flowers, Gratitude and Thanks
- How I Migrated from WordPress to Astro š
- Setting up Netlify Redirects with Astro š
- List all URLs š
- astro-erudite š
- wordpress-export-to-markdown š
- The ultimate Astro + Google Analytics guide š
š¶ ā¦You donāt know how much you mean to meā¦āCause even though when times got roughā¦You never turned away, you were right thereā¦And I thank you, thank youā¦When I felt I had enoughā¦You never turned away, you were right thereā¦And I thank you, thank youā¦
Spotify Playlist š§
By the time you reach the bottom of this page, the build should be a success. š«”