Curtis McHale

Tips for developers adopting a legacy WordPress site

legacy-wpGreenfield projects are the dream of most of developers. We have no legacy code to deal with. Just a clean WordPress install and whatever tools we decide best accomplish the goals of the client.

Unfortunately you’re not always going to get greenfield projects. Some will have legacy code that you have to accommodate and you may even be getting a repair job where the legacy code is just busted.

Here’s how I approach a client project that has legacy issues.

Review Review Review

It’s pretty typical for a client to know what the issues are with their site. You’ll get a list like:

  • infinite redirect loop on category pages
  • super slow when I view the homepage
  • I have no idea why we are getting post content on my sidebar on X page.

I’ve got a starting point sure, but I don’t have any idea why those things are happening either. I haven’t seen the code and I probably don’t know who built the site and the type of code they write (it’s all bad if you didn’t write it right!). The best I’ve got is a guess about why it might be happening and you can’t quote fixes on a guess.

That means the starting point is a site/code review. For my clients I book in a 5 – 10 hour review with the goal of determining why the issues they’ve highlighted are happening and what it’s going to take to fix it.

My reviews have 3 main categories that roughly follow below (but with more client friendly names).

  1. Urgent as in the internet will blow up and you will be hacked
  2. Important but not any impending issues that I see
  3. I dislike it, but there is nothing wrong with this approach I guess

Items like not equeueing javascript properly or using query_posts I put in “Urgent”, and things like using deprecated functions in “Important”. Relying on a plugin that’s not as solid as other offerings (like not using Gravity Forms) is my third priority item.

How I review

Read more

our sponsors

Hosting.com logo
Omnisend
Kinsta
Progress Planner
Elementor
WP Munich
Atarim
Patchstack

Looking for our logo?

You're in the right spot!

Check out our Logo & Style page.