Delete -2 in url

Hello,

I made a post with a certain name. Then I deleted it, because I wanted it to be a page. When I made the page, I saw in the url -2 behind the name.

How to delete the -2 (https://sitepower.nl/website-laten-maken-2)?

I deleted the previous post and also emptied the trash. I also deleted the new page and the trash and started all over again. But it dit not work. When I make a post with the same name again, then the url does not show the -2.

How do I make a page without the -2?

Cheers,
André

Hi André,

Please check the Trash section in the wordpress Pages and delete the previous page with the URL.

Hope this helps.

Hello Jade,

Thank you for your answer. But I already deleted the trash, as mentioned above.

What else can I do?

Hello @andre1980,

In that case you should check for similar URL slug under pages section as that might be the case. You can also try to remove by clicking on quick edit button and remove -2 from Slug field.

Let us know how it goes.

Thanks.

I checked that out. No such page there. I put them all in the trash can and emptied the trash can.

I also tried to delete the -2, but it comes back.

The strange this is: when I make a new post, there is no problem. Only with the page.

Hi Andre,

Would you mind sharing your admin details in a secured note so that we can check it?

Thank you.

Found a solution to this problem! I searched inside the database for this url and changed the name there (inside wp_posts). Now I can create a new page with the right name :slight_smile:
The question that now remains is how could this happen and is this ‘hidden page/post’ still findable within wordpress?
Or can I only delete it through the database?

Hello @andre1980,

Usually it should not happen. WordPress is a CMS and contents are saved in database. When you delete post/page from trash it gets deleted from database. My suggestion would be to optimize the database and then check if you still face the problem. Please refer following post to optimize database:

Thanks.

1 Like