How to Disable JSON REST API in WordPress [EN]
WordPress 4.4 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.
Why You Need to Disable JSON REST API in WordPress?
There is no denying that the API will bring lots of benefits for WordPress developers. The API makes it super easy to retrieve data using GET requests, which is useful for those building apps with WordPress.
However, most site owners may not be needing those features at all.
Having that said, this could potentially open 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.
Disabling JSON REST API in WordPress
First thing you need to do is install and activate the Disable REST API plugin. For more details, see our step by step guide on how to install a WordPress plugin.
The plugin works out of the box and there are no settings for you to configure.
It will now forcibly return an authentication error to any API requests from sources who are not logged into your website.
This will effectively prevent unauthorized requests from using the REST API to get information from your website.
You can test this by visiting http://example.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 example.com with your own domain name. You will see this message, indicating that REST API requests are blocked.
That’s all, you have successfully disabled unauthorized REST API requests on your WordPress site.
We hope this article helped you learn how to Disable JSON API in WordPress. Security conscious users may also want to checkout these tips on protecting WordPress admin area.
Source: wpbeginner.com
For permission content from this site must be hyperlinked when used!
- Published in How-Tos, weSoftware
How to Change the Color of Address Bar in Mobile Browser to Match Your WordPress Site
Have you noticed that many popular websites like BBC and Facebook use their own brand colors for the address bar in mobile browser. Recently, one of our users asked us if we could write about how to change the color of address bar in mobile browser to match their WordPress theme? In this article, we will show you how to change the color of address bar in mobile browser to match your WordPress site.
Why Match Address Bar Color in Mobile Browser?
Most popular WordPress themes are mobile responsive. This makes your site looks great on mobile devices. However, it still looks and feels like a website.
Matching the color of address bar to your WordPress site, gives it a native app-like feel. This improves user experience, which ultimately boosts sales and conversions.
However, please note that currently it only works for Google Chrome web browser on Android devices using Lollipop or newer versions.
Match Address Bar Color on Mobile Browser to Your WordPress Theme
Simply add this code in your theme or child theme‘s header.php
file just before the closing </head>
tag.
<meta name="theme-color" content="#ff6600" />
This line is a HTML meta tag used by Google Chrome on Android to change color of address bar in mobile browser. The content field has the hex code for the color you want to use as theme color.
Not sure how to get the hex color code?
You can get the HEX value of a color using any image editing software like Adobe Photoshop, Gimp, Paint, etc.
You can also pick a color using online HTML color picker tools.
If you want to pick a color from a web page, then you can use a browser extension like ColorZilla.
That’s all, we hope this article helped you learn how to change the color of address bar in mobile browser to match your WordPress site. You may also want to see our CSS Hero review, it is the easiest way to customize your WordPress theme.
For permission content from this site must be hyperlinked when used!
- Published in Technology, weDesign, weSoftware, weTechnology
- 1
- 2