· Blog · 5 min read
Why We Left WordPress for Astro: A Technical Writeup
After years of running on the same platform, it became clear the website needed more than a few tweaks to stay up to date. The old setup was functional but had grown outdated, both visually and technically. Instead of trying to patch things up, I decided it was time for a complete revamp—something fresh, fast, and secure to better meet our current needs.
Why Change from WordPress?
- The current version of our WordPress theme isn’t maintained, and switching to a new one would be a huge chore.
- Many of our plugins are in the same boat. They’re often bloated with features and upsells we don’t need or use.
- The layout of the site has basically been unchanged since 2018.
- WordPress has become increasingly vulnerable to security threats and presents a large attack surface. The old site’s WordPress dashboard was hit with thousands of automated attacks daily. Security plugins would log and ban the attackers' IP addresses, but the sheer volume of bots meant no real impact on the attack frequency.
- WordPress is primarily designed for blogging, and while we do maintain a blog (as you can see since you’re reading this), hosting content pages is our primary focus.
- Although WordPress is simple to use, under the hood it’s very complex. It includes a lot of features that many people don’t need, but they’re still part of the core system, which makes modifying it more difficult.
Why Astro?
- Simplified Site Management: While Astro doesn’t have a built-in backend and relies on direct file edits, this is actually a huge benefit. There’s no database or additional routing logic to maintain, and no web-facing interface means fewer security risks. Everything is a file you edit directly, and changes are instantly reflected on the site.
- Static Rendering: Astro is extremely fast. Since content is statically rendered by default, I didn’t have to mess with caching or other tedious performance optimizations. While the WordPress site wasn’t slow (it loaded each page in about 1-1.5 seconds), Astro consistently loads in under a second, often within milliseconds.
- Reduced Server and Client Resources: By default, Astro doesn’t use JavaScript, which means it consumes less CPU and RAM on both the client (you, the visitor) and the server.
- Modular Components: The theme and components are built to be customizable right out of the box. I was able to easily design new parts of the site and tweak existing ones to fit our needs. For example, our custom-built download counter was seamlessly integrated into the existing components while maintaining compatibility. Adjusting things like logo size and placement was straightforward and easy to get right.
- Better SEO (Search Engine Optimization): Thanks to static site rendering and excellent Google Lighthouse scores, search engines like Google favor Astro over slower, more complex sites that are harder to scan.
- Hosting Flexibility: Without a database, backing up the site and moving it to a new host is as simple as copying the files and pointing the DNS to the new location. That’s it.
How We Made the Switch
Now, onto the "how." I started with a JavaScript file that imported the RSS feed from the WordPress site into markdown files that could be used in Astro. This wasn’t the ideal method, and neither was the script I found on the Astro website.I ended up using the WordPress API in JavaScript instead, which allowed me to import everything in one go—pages, posts, menus, you name it. This was a huge step forward because now I had everything backed up and ready to work with, without worrying about losing information during manual copy-pasting.
Next, I had to decide on the layout. Initially, I set the site up as a close copy of the old one, but elements like the slider felt very dated and out of place on the new site. With Astro, I had full access to the entire page layout, unlike the narrower viewbox constraints of WordPress. I chose to use the existing components bundled with my starter theme to modernize the site’s look and feel. I also redid the logo using vector graphics, ensuring it looks sharp at any resolution, unlike the old logo that often appeared blurry at certain screen sizes.
Then I focused on refining the site even further. I rewrote several components to better fit my needs and built new ones to handle things like simple download cards and notes on various pages.
Lastly, I had to configure redirects on the server. Many of the old site’s pages and download links were generated by WordPress plugins and had odd URLs. I wanted to ensure anyone visiting those old links would be redirected to the correct pages on the new site.
Final Thoughts
All in all, it’s hard not to be thrilled with the changes. The site looks better, performs faster, and gives me full control over updates and upgrades without worrying about compatibility or complexity issues that come with a larger plugin or theme ecosystem. While I’ll miss having a built-in editor, the benefits of this new setup far outweigh the drawbacks. WordPress wasn’t perfect, but after 14 years, it certainly did the job it needed to.
For a deeper dive into the user-facing changes and improvements, check out our detailed article on the latest features and enhancements.