Recently, I was trying to fix a problem on my website when I was forced down the rabbit hole of website maintenance. You’d think with a degree in Computer Engineering I’d know how to take care of my website, but you’d be wrong. That’s why I’ve decided to pass on what I’ve learned about website maintenance with you.
Table of Contents
For those who care, I have almost 200 posts on this website. Over the last two years, a lot of things have changed, so it’s only natural that a lot of links have broken. As a result, I briefly installed the Broken Link Checker plugin to run a quick website cleanup.
According to the plugin, I have nearly 1000 unique links on this site, and a handful of them were broken. In addition, I had a ton of redirected links due to category or slug changes over the last year or so. Fortunately, the plugin makes it easy to remove broken links and fix redirected links.
Now, I’m hoping the site is at least a little more user friendly. If that also scores me SEO and performance points, I’m happy.
While checking for broken links is easy, maintaining a database is not. In the future, I plan to write a much more detailed article to help you manage your own WordPress database. For now, I’ll share some of the highlights.
The first step to troubleshooting any major WordPress issue is to deactivate all your plugins and switch your theme. Obviously, you don’t want to do this on a live site, so one option is to use the Health Checker plugin.
Basically, the Health Checker plugin keeps your site up for your users while you deactivate everything for testing purposes. I honestly don’t know how it works, but I’ve managed to use it twice on my site.
Unfortunately, it’s never helped me, and I know it’s actually broken sites before. So, be careful with this plugin.
When Health Checker isn’t an option, it’s always a good idea to create a copy of your site for testing purposes. Fortunately, WP Staging is a plugin that allows you to build a copy of your site. The purpose of this copy is to allow you to make changes and push those changes back to the live site when they’re ready.
Of course, I needed a copy of the site, so I could do some troubleshooting without breaking my live site. Unfortunately, I ran into some problems with this as well.
As it turns out, my hosting provider throttles my max database size to a single Gigabyte. When I went to clone my database, the database doubled in size which threw me over my limit. At that point, I wasn’t able to actually generate the link to the cloned site.
Of course, I didn’t know this initially. So after five more attempts, my database ballooned to over 3 GB. Ironically, WP Staging doesn’t offer any utilities to clean up these clones, so I had to do it all by hand.
Fortunately, I was able to write a fun little MySQL query which deleted all my cloned tables using just their prefix. Unfortunately, I discovered I had a lot to clean up.
The quickest way to get to the cleanup was to download yet another plugin called WP Sweep. As the name implies, the WP Sweep plugin allows you to sweep various sections of your database that the plugin deems unnecessary.
Personally, I didn’t find the plugin aggressive enough. For instance, I had several tables that were used for plugins that I no longer had, and WP Sweep doesn’t handle that case. As a result, I had to delete a few tables by hand.
That said, WP Sweep is excellent. It allowed me to remove a ton of stuff from my database including about 8500 revisions of articles on the site. To put that into perspective, that was like 300 MB of content. Now, I’m down to a cool 500 MB.
I definitely recommend this plugin even if you just download it to do some quick cleanup and remove it. I’d say it’s worth it.
In the future, I plan to write an article which walks through exactly what I did to clean up my site. For now, I just wanted to share a bit of an update, so you knew what was happening.
Hopefully, the site runs faster for you. I’ve done a ton lately to improve the general user experience such as:
- Removing the store
- Reducing the number of clicks need to find things on the site
- Fixing broken links
- Removing junk data from the site such as:
- Old unused tags
- Old revisions
- Old plugin data
- Reducing the number of plugins
- Dumping trash posts and comments
Let me know if you’re noticing a difference at all. If not, no worries! I’m happy with all these changes as they’ve drastically simplified my day-to-day workflow. Now, all I do is write!
As always, thanks for checking out my work. If you’re interesting in keeping up with the site, consider subscribing. It’s free, and you’ll get a weekly newsletter with my latest work.
Until next time!
Poetry was life changing for me as a Python developer. You really ought to try it.
Making a Sandwich is Not Rocket Science: How Elitists Always Stay on Top
If you're struggling in the tech field, please read this. I'm looking to build a community for folks who lack proper mentors.