PHPackages                             log1x/acorn-disable-media-pages - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. log1x/acorn-disable-media-pages

ActivePackage[Utility &amp; Helpers](/categories/utility)

log1x/acorn-disable-media-pages
===============================

Disable media attachment pages in WordPress.

v1.0.2(2y ago)23147.6k—3.7%1[1 PRs](https://github.com/Log1x/acorn-disable-media-pages/pulls)MITPHPPHP &gt;=8.1

Since Nov 2Pushed 2y ago1 watchersCompare

[ Source](https://github.com/Log1x/acorn-disable-media-pages)[ Packagist](https://packagist.org/packages/log1x/acorn-disable-media-pages)[ GitHub Sponsors](https://github.com/Log1x)[ RSS](/packages/log1x-acorn-disable-media-pages/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (5)Used By (0)

Acorn Disable Media Pages
=========================

[](#acorn-disable-media-pages)

[![Latest Stable Version](https://camo.githubusercontent.com/449fc3cb862242334962ee2c6f573e2a0901a50a7389b859abed13504a343154/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c6f6731782f61636f726e2d64697361626c652d6d656469612d70616765732e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/449fc3cb862242334962ee2c6f573e2a0901a50a7389b859abed13504a343154/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c6f6731782f61636f726e2d64697361626c652d6d656469612d70616765732e7376673f7374796c653d666c61742d737175617265)[![Total Downloads](https://camo.githubusercontent.com/692382074638e0efd7502f5f67b789d726ecb6508b5c3db766b1e1d67937e22d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c6f6731782f61636f726e2d64697361626c652d6d656469612d70616765732e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/692382074638e0efd7502f5f67b789d726ecb6508b5c3db766b1e1d67937e22d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c6f6731782f61636f726e2d64697361626c652d6d656469612d70616765732e7376673f7374796c653d666c61742d737175617265)[![Build Status](https://camo.githubusercontent.com/7dfc2da237a593a282ad623ac1424f4cd6c7366797d01f806a1c29f6779188aa/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6c6f6731782f61636f726e2d64697361626c652d6d656469612d70616765732f6d61696e2e796d6c3f6272616e63683d6d61696e267374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/7dfc2da237a593a282ad623ac1424f4cd6c7366797d01f806a1c29f6779188aa/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6c6f6731782f61636f726e2d64697361626c652d6d656469612d70616765732f6d61696e2e796d6c3f6272616e63683d6d61696e267374796c653d666c61742d737175617265)

Disable Media Pages is an [Acorn](https://github.com/roots/acorn) package for WordPress that disables media attachment pages and generates unique UUID's for each media attachment's `post_name` to prevent clashing.

WordPress 6.4 will bring the ability to ["disable" attachment pages](https://make.wordpress.org/core/2023/10/16/changes-to-attachment-pages/) but attachments will still generate unnecessary slugs based on the uploaded media's filename.

Features
--------

[](#features)

- Replaces media attachment `post_name` slugs with randomly generated UUID's with [`Str::uuid()`](https://laravel.com/docs/10.x/strings#method-str-uuid).
- Replaces the "View" media URL with a direct link to the media.
- 404's any requests made to media attachment page slugs.
- Easily convert/revert existing media page slugs using Acorn's CLI.

Requirements
------------

[](#requirements)

- [PHP](https://secure.php.net/manual/en/install.php) &gt;= 8.1
- [Acorn](https://github.com/roots/acorn) &gt;= 3.0

Installation
------------

[](#installation)

Install via Composer:

```
$ composer require log1x/acorn-disable-media-pages
```

Usage
-----

[](#usage)

### Getting Started

[](#getting-started)

This package has no configuration and will start working once installed.

### Existing Media

[](#existing-media)

To convert existing media, simply use the following Acorn command:

```
$ wp acorn media:generate-slugs
```

### Reverting Slugs

[](#reverting-slugs)

Warning

Reverting your attachment `post_name` slugs may not restore them 1:1 to what they were prior to conversion.

This command simply re-generates the slugs for each media attachment based on the existing `post_title` falling back to the filename if the existing `post_title` is empty.

```
$ wp acorn media:generate-slugs --revert
```

Bug Reports
-----------

[](#bug-reports)

If you discover a bug in Acorn Disable Media Pages, please [open an issue](https://github.com/log1x/acorn-disable-media-pages/issues).

Contributing
------------

[](#contributing)

Contributing whether it be through PRs, reporting an issue, or suggesting an idea is encouraged and appreciated.

License
-------

[](#license)

Acorn Disable Media Pages is provided under the [MIT License](LICENSE.md).

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity42

Moderate usage in the ecosystem

Community10

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~30 days

Total

3

Last Release

867d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5745907?v=4)[Brandon](/maintainers/Log1x)[@Log1x](https://github.com/Log1x)

---

Top Contributors

[![Log1x](https://avatars.githubusercontent.com/u/5745907?v=4)](https://github.com/Log1x "Log1x (9 commits)")[![Soean](https://avatars.githubusercontent.com/u/695201?v=4)](https://github.com/Soean "Soean (1 commits)")

---

Tags

acornsagewordpresswordpressacorn

###  Code Quality

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/log1x-acorn-disable-media-pages/health.svg)

```
[![Health](https://phpackages.com/badges/log1x-acorn-disable-media-pages/health.svg)](https://phpackages.com/packages/log1x-acorn-disable-media-pages)
```

###  Alternatives

[tgmpa/tgm-plugin-activation

TGM Plugin Activation is a PHP library that allows you to easily require or recommend plugins for your WordPress themes (and plugins).

1.8k222.5k13](/packages/tgmpa-tgm-plugin-activation)[aristath/kirki

Extending the WordPress customizer

1.3k73.0k4](/packages/aristath-kirki)[afragen/git-updater

A plugin to automatically update GitHub, Bitbucket, GitLab, or Gitea hosted plugins, themes, and language packs.

3.3k1.6k](/packages/afragen-git-updater)[tiny-pixel/acorn-block-templates

Block templates for Sage 10

191.2k](/packages/tiny-pixel-acorn-block-templates)[justintadlock/hybrid-carbon

God-like post featured image script.

202.5k](/packages/justintadlock-hybrid-carbon)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
