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 →
GridShow PRO WordPress Theme

GridShow PRO

GridShow PRO WordPress theme is a feature-rich, advanced version of GridShow Free WordPress Theme. GridShow PRO version has color and...

$25.00
WP Masonry PRO WordPress Theme

WP Masonry PRO

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

$25.00
Simple Writer PRO WordPress Theme

Simple Writer PRO

Simple Writer PRO is a feature-rich, improved and advanced version of Simple Writer Free WordPress Theme. When compare with the...

$25.00
Simple Grid PRO WordPress Theme

Simple Grid PRO

You'll be pleased with the Simple Grid PRO WordPress theme if you have tried the free version. It is a...

$25.00
BestWP PRO WordPress Theme

BestWP PRO

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

$25.00
GridFlex PRO WordPress Theme

GridFlex PRO

If you have used GridFlex Free WordPress Theme, then you will love the premium version. GridFlex PRO version has color...

$25.00
NeatMag PRO WordPress Theme

NeatMag PRO

Do you like the NeatMag Free WordPress Theme?, Then you will love the premium version. NeatMag PRO is very user...

$25.00
FlashWP PRO WordPress Theme

FlashWP PRO

If you like FlashWP free WordPress Theme, you will love the premium version. FlashWP PRO is advanced, more user friendly,...

$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 56 WordPress themes.