I know why setting a numerical permalink for a post would mean WordPress confuses page name and number.

However, I notice on the site I am working on (WordPress 4), that you can both edit the permalink to contain a number and also that if the title of the page is a number, then it also saves with a numerical permalink. These pages then 404.

Is this just a bug with WordPress or is something broken on my site? Should WordPress be validating the permalink so a numeric one is not possible?

Links are being generated on the site by the PHP .

If it should be validating the links, at what point does it validate them, eg does it do it on save, or before outputting the link to the front end.

Read more here: WordPress can generate numeric permalinks, which then 404


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: