I am experiencing some odd behavior, that apparently happens ‘out of the box’ with WordPress.

If I upload a file through the media manager called: services.jpg; then go try to create a page with the permalink http://example.com/services/; The slug services-2 is given instead, because the attachment is already using that slug.

Visiting http://example.com/services/ loads the attachment page.

I have not enabled any plugins or added anything into functions.php to modify the rewrites for attachments.

Has anyone run into this before? Know where to start to disable this functionality?

Read more here: Stop WordPress from reserving slugs for media items?


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: