WordPress 4.4 adds all sorts of new REST API functionality. Which is great if your site is using it. But if not, then you may want to remove all of the extra baggage that WordPress now adds to every page load. This tutorial explains how to disable it.

Note: before implementing any of these techniques, make sure that your site does not need any of the REST API stuff in WP 4.4. and beyond. That is, only disable if you know what you are doing ;)

Why?

Why would someone want to do this? Because not everyone uses or wants the WP REST API, so the link headers and related markup are not always necessary. For example, none of my sites use any of the REST API stuff. I like to keep things lightweight, fast, and relevant. One way to do this is to disable unnecessary code.

But hey, to each their own. If you want/use the REST API, then by all means knock yourself out and don’t disable it. Keep rockin’ bros.

Overview

This article explains how to disable three bits of code that WordPress now adds to front-end pages:

REST API link tag

oEmbed Discovery Links

REST API link in HTTP headers

Honestly I’m not sure if the oEmbed links are considered a part of the REST API, but they look similar, appear in the same location, and were introduced at the same time as the other REST stuff, so I’m gonna include it here.

So now let’s look at each of these three items and see how to disable them.