In Joomla 3.8.2 (and probably 3.8) or later to remove ID from URL you go to System->Global Configuration->Articles->Integration page, select Modern URL Routing and then select Remove IDs from URLs:
In an older Joomla version including 3.7 you do not have this option and you shell go another way described in my post How to remove ID from URL in Joomla 2.5-3.7. For example, in Joomla 3.7.4 this page look like this:
I have tried all the methods even changing the codes in router.php but of no use, I have even created new articles after that, it was for a banking portal url-was-removed-by-admin.