How to Disable REST API Links in WordPress

You can get rid of all head links to the REST API endpoints from the page source by adding the following code to your theme's functions.php file.

remove_action( 'xmlrpc_rsd_apis', 'rest_output_rsd' );
remove_action( 'wp_head', 'rest_output_link_wp_head' );
remove_action( 'template_redirect', 'rest_output_link_header', 11 );

Our WordPress Themes

Below are some of our premium WordPress themes. View all our free and premium WordPress themes →
PrimeWP PRO WordPress Theme

PrimeWP PRO

If you like PrimeWP Free WordPress Theme?, Then you will love the premium version. PrimeWP PRO is an more improved...

$25.00
GalleryWP PRO WordPress Theme

GalleryWP PRO

If you like GalleryWP free WordPress Theme, you will love the premium version. GalleryWP PRO is an improved version of...

$25.00
Clean Gallery PRO WordPress Theme

Clean Gallery PRO

If you like Clean Gallery free WordPress Theme, you will love the premium version. Clean Gallery PRO is an elegant,...

$25.00
MaxWP PRO WordPress Theme

MaxWP PRO

If you like MaxWP free WordPress Theme, you will love the premium version. MaxWP PRO is feature-rich, easy to use,...

$25.00
BoxWP PRO WordPress Theme

BoxWP PRO

If you like BoxWP free WordPress Theme, you will love the premium version. BoxWP PRO is an elegant, user-friendly, feature-rich,...

$25.00
TextWP PRO WordPress Theme

TextWP PRO

TextWP PRO is an more improved and advanced version of TextWP Free WordPress Theme. When compare with the TextWP free...

$25.00
ElegantWP PRO WordPress Theme

ElegantWP PRO

If you like ElegantWP free WordPress Theme, you will love the premium version. ElegantWP PRO is very user friendly, feature-rich,...

$25.00
NeatBlog PRO WordPress Theme

NeatBlog PRO

NeatBlog PRO WordPress Theme is the advanced, feature-rich version of the NeatBlog Free WordPress Theme. NeatBlog PRO version has color...

$25.00

Can't you choose a single theme? Purchase All Themes for $75.

Save money with our low, one-time price for access to all of our 55 WordPress themes.