Disable WP REST API

Por Jeff Starr
(34 avaliações)
Baixar
  • Versão:
    2.6.4
  • Última atualização:
    há 11 dias
  • Instalações ativas:
    mais de 20 mil
  • Versão do WordPress:
    4.6 ou maior
  • Testado até o WordPress:
    6.7
  • Versão do PHP:
    5.6.20 ou maior
  • Tags:

Hospedagem WordPress com plugin Disable WP REST API

Onde posso hospedar o plugin Disable WP REST API?

Este plugin pode ser hospedado em qualquer provedor que tenha WordPress instalado. Recomendamos fortemente optar por uma empresa de hospedagem seguro, com servidores otimizados para WordPress, como o serviço de hospedagem de sites da MCO2.

Hospedando o plugin Disable WP REST API em um provedor seguro

A MCO2, além de instalar o WordPress na versão mais atualizada para seus clientes, oferece o plugin WP SafePress, um mecanismo exclusivo que protege e aumenta a performance do seu site conjuntamente.

Por que a Hospedagem WordPress funciona melhor na MCO2?

A Hospedagem WordPress funciona melhor pois a MCO2 possui servidores otimizados para WordPress. A instalação de WordPress é diferente de uma instalação trivial, pois habilita imediatamente recursos como otimização de imagens, proteção da página de login, bloqueio de atividades suspeitas diretamente no firewall, cache avançado e HTTPS ativado por padrão. São plugins que potencializam seu WordPress para a máxima segurança e o máximo desempenho.

This plugin does one thing: disables the WP REST API for visitors who are not logged into WordPress. No configuration required.

This plugin works with only 22 short lines of code (less than 2KB). So it is super lightweight, fast, and effective.

Features

  • Disable REST/JSON for visitors (not logged in)
  • Disables REST header in HTTP response for all users
  • Disables REST links in HTML head for all users
  • 100% plug-and-play, set-it-and-forget solution

The fast, simple way to prevent abuse of your site’s REST/JSON API

How does it work? That depends on which version of WordPress you are using..

WordPress v4.7 and beyond

For WordPress 4.7 and better, this plugin completely disables the WP REST API unless the user is logged into WordPress.

  • For logged-in users, WP REST API works normally
  • For logged-out users, WP REST API is disabled

What happens if logged-out visitor makes a JSON/REST request? They will get only a simple message:

“rest_login_required: REST API restricted to authenticated users.”

This message may customized via the filter hook, disable_wp_rest_api_error. Check out this post for an example of how to do it.

Older versions of WordPress

For WordPress versions less than 4.7, this plugin simply disables all REST API functionality for all users.

More information available below in the FAQs section.

Privacy

This plugin does not collect or store any user data. It does not set any cookies, and it does not connect to any third-party locations. Thus, this plugin does not affect user privacy in any way. If anything it improves user privacy, as it protects potentially sensitive information from being displayed/accessed via REST API.

Disable WP REST API is developed and maintained by Jeff Starr, 15-year WordPress developer and book author.

Support development of this plugin

I develop and maintain this free plugin with love for the WordPress community. To show support, you can make a donation or purchase one of my books:

And/or purchase one of my premium WordPress plugins:

Links, tweets and likes also appreciated. Thank you! 🙂

Plugins semelhantes

Editor clássico
(1.189 avaliações)

Ativar o editor "clássico" anterior e o estilo antigo da tela Editar Post com TinyMCE, Meta Boxes, etc. Suporta todos os plugins que estendem esta tela.

Widgets Clássicos
(249 avaliações)

Ativa a tela clássica de configuração de widgets em Aparência > Widgets e em Personalizar. Desativa o editor de blocos ao gerenciar widgets.

Disable Comments – Remove Comentários e Interrompe o Spam [Suporte a Multi Site]
(270 avaliações)

Permite que os administradores desativem globalmente os comentários em seu site. Os comentários podem ser desativados de acordo com o tipo de post. Compatível com multisite.

WooCommerce Legacy REST API
(21 avaliações)

The WooCommerce Legacy REST API, which is now part of WooCommerce itself but will be removed in WooCommerce 9.0.

InfiniteWP Client
(167 avaliações)

Install this plugin on unlimited sites and manage them all from a central dashboard. This plugin communicates with your InfiniteWP Admin Panel.

Disable Admin Notices individually
(334 avaliações)

Disable admin notices plugin gives you the option to hide updates warnings and inline notices in the admin panel.

Do mesmo author (Jeff Starr)

Disable Gutenberg
(715 avaliações)

Disable Gutenberg Block Editor and restore the Classic Editor and original Edit Post screen (TinyMCE, meta boxes, etc.).

GA Google Analytics – Connect Google Analytics to WordPress
(156 avaliações)

Adds Google Analytics 4 tracking code to your WordPress site. Supports many tracking features.

BBQ Firewall – Fast & Powerful Firewall Security
(139 avaliações)

The fastest firewall plugin for WordPress. Protect against a wide range of threats with minimal performance impact.

Disable Lazy Load
(22 avaliações)

Activate this plugin to disable the Lazy Loading feature that was added in WP v5.5.

Disable Media Sizes
(20 avaliações)

Provides options to disable the extra images generated by WordPress.

Simple Blog Stats
(35 avaliações)

Displays a wealth of useful statistics about your site. Display total number of posts, pages, categories, tags, and much more.