Dotlayer
  • News
  • Startups
  • Tutorials
  • SEO
  • Marketing
  • Interviews
No Result
View All Result
Dotlayer
  • News
  • Startups
  • Tutorials
  • SEO
  • Marketing
  • Interviews
No Result
View All Result
Dotlayer
No Result
View All Result

Why and How to Safely Disable The JSON REST API in WordPress 2017

March 26, 2017
in Tutorials
0 0
Share on FacebookShare on Twitter

With the release of the latest version of WorpPress, WordPress 4.4, the developers added the much anticipated JSON REST API. It is great for plugin developers, but many site owners may not find it useful at all. In this article, we will show you how to easily disable the JSON REST API in WordPress. The feature makes it possible to access your content through a JSON API, which is awesome for external services and clients. This snippet lets you disable this WordPress REST API if you for some reason don’t want to use it.

add_filter('json_enabled', '__return_false');
add_filter('json_jsonp_enabled', '__return_false');

One of the main reasons you should disable the JSON api is that it opens your website to a new front of DDoS attacks. It can be resource intensive and slow down your website. It is similar to disabling XML-RPC, which many site admins disable on their WordPress sites just to be on the safe side.

You can test if this code snippet worked by visiting https://dotlayer.com/wp-json page. Make sure you logout of WordPress admin area first or switch your browser to incognito mode. Don’t forget to replace with your own domain name. You will see this message, indicating that REST API requests are blocked.

ShareTweetPin
Previous Post

How to Restrict WordPress Dashboard Access to Admins Only?

Next Post

The Top SEO Optimized WordPress Themes for 2017

Next Post

The Top SEO Optimized WordPress Themes for 2017

You might also like

Mint Linux vs Ubuntu: Which is Right For You?

Mint Linux vs Ubuntu: Which is Right For You?

March 12, 2022
Net Neutrality: What is it and Why Should You Care?

Net Neutrality: What is it and Why Should You Care?

March 12, 2022
Solid State Drives – Why You Should Buy One Today

Solid State Drives – Why You Should Buy One Today

March 12, 2022

Machine Learning Algorithms Every Beginner Should Know

January 25, 2022
What Is the log4j Vulnerability, log4shell, an Example Step-By-Step Exploit and How to Fixed It

What Is the log4j Vulnerability, log4shell, an Example Step-By-Step Exploit and How to Fixed It

December 11, 2021
Simple Video Call integration into Website with Jitsi

Simple Video Call integration into Website with Jitsi

May 26, 2020
  • Terms of Service
  • Privacy Policy
  • Careers

© 2021 Dotlayer.com

No Result
View All Result
  • About Us
  • Advertise
  • Blog
  • Careers
  • Contact
  • Contact Us
  • Get Featured
  • Home Layout 1
  • Home Layout 2
  • Home Layout 3
  • Privacy Policy
  • Security
  • Services
  • Subscribe To Dotlayer
  • Terms of Service
  • Write For Us

© 2021 Dotlayer.com

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In