Disable Media Pages

Por joppuyo
(17 avaliações)
Baixar
  • Versão:
    4.0.0
  • Última atualização:
    há 5 dias
  • Instalações ativas:
    mais de 10 mil
  • Versão do WordPress:
    6.0 ou maior
  • Testado até o WordPress:
    6.8.2
  • Versão do PHP:
    8.0 ou maior
  • Tags:

Hospedagem WordPress com plugin Disable Media Pages

Onde posso hospedar o plugin Disable Media Pages?

Este plugin pode ser hospedado em qualquer hospedagem que tenha WordPress instalado. Recomendamos fortemente escolher um provedor de hospedagem confiável, com servidores especializados para WordPress, como o serviço de hospedagem da MCO2.

Hospedando o plugin Disable Media Pages em um provedor de confiança

A MCO2, além de configurar e instalar o WordPress na versão mais atual para seus clientes, disponibiliza o WP SafePress, um mecanismo exclusivo que salvaguarda e otimiza 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 e fotos, proteção da página de login, bloqueio de atividades maliciosas diretamente no firewall, cache avançado e HTTPS ativado por padrão. São recursos que potencializam seu WordPress para a máxima segurança e o máximo desempenho.

Completely disable “attachment” pages created by WordPress.

By default, WordPress creates a page for each of your attachments. This is can be undesirable because of two reasons:

Search engine optimization

Attachment pages don’t have any content, except an image, so they provide little value and can negatively affect your SEO because they are so-called thin content. Even worse, attachment pages may in some cases rank higher than your actual content pages which leads to a poor user experience.

Reserved slugs

Attachment pages can accidentally reserve slugs on your site. Let’s say you upload an image named contact.jpeg, an attachment page https://example.com/contact is automatically created. If you then try to create a page named Contact, the URL for that page will be https://example.com/contact-2 which isn’t that great.

How it works

This plugin works by automatically setting all attachment slugs to an unique id, so they won’t conflict with your pages. If an attachment page is accessed, the plugin will set a 404 status code and display the “page not found” template.

You can also mangle any existing attachment slugs so they won’t cause any issues in the future.

WP CLI support

The plugin supports WP CLI.

Mangle existing attachment slugs

wp disable-media-pages mangle

Restore attachment slugs

wp disable-media-pages restore

Note for WordPress 6.4

WordPress 6.4 includes a new feature that allows you to disable attachment pages. However, this feature redirects attachment pages to the file URL instead of returning a 404 error. To completely disable attachment pages, you should use this plugin instead. The WP 6.4 feature also does not fix the issue where attachment pages reserve slugs for pages.

Also, there is not user interface to enable or disable media pages, they are automatically disabled for new sites but remain enabled for existing sites.

Because of these issues, I recommend you to use this plugin instead of the built-in feature. The plugin will be updated in the foreseeable future, at least until attachment pages are completely removed from WordPress core and older WordPress versions are no longer in use.

Thanks

Special thanks to Greg Schoppe for his research and inspiration that helped a lot with developing this plugin.

Support the plugin

Maintaining a WordPress plugin is a lot of work. If you like the plugin, please consider rating it on WordPress.org. You can also support me on GitHub sponsors. Thank you!

If you are interested, you can also check out my other WordPress plugins:

Plugins semelhantes

Editor clássico
(1.198 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
(253 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 – Remoção de comentários e interrupção de spam [compatível com multisite]
(273 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.

Enable Media Replace
(295 avaliações)

Easily replace any attached image/file by simply uploading a new file in the Media Library edit view - a real time saver!

Disable Admin Notices individually
(336 avaliações)

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

WP Ghost (Hide My WP Ghost) – Segurança e firewall
(365 avaliações)

Oculte e proteja os caminhos do WP, “wp-login”, “wp-admin” e muitos outros. Prevenção contra hackers, segurança, proteção contra força bruta, firewall 8G, acesso 2FA e muito mais.